func (u *SessionUtil) changeModeOfSudoersFile(log log.T) error {
	fileMode := os.FileMode(sudoersFileMode)
	if err := os.Chmod(sudoersFile, fileMode); err != nil {
		log.Errorf("Failed to change mode of %s to %d: %v", sudoersFile, sudoersFileMode, err)
		return err
	}
	log.Infof("Successfully changed mode of %s to %d", sudoersFile, sudoersFileMode)
	return nil
}
// changeModeOfSudoersFile will change the sudoersFile mode to 0440 (read only).
// This file is created with mode 0666 using os.Create() so needs to be updated to read only with chmod.
changeModeOfSudoersFile will change the sudoersFile mode to 0440 (read only).
This file is created with mode 0666 using os.Create() so needs to be updated to read only with chmod.
// changeModeOfSudoersFile will change the sudoersFile mode to 0440 ( read only ) . // This file is created with mode 0666 using os . Create () so needs to be updated to read only with chmod .
func (u *SessionUtil) changeModeOfSudoersFile(log log.T) error {
	fileMode := os.FileMode(sudoersFileMode)
	if err := os.Chmod(sudoersFile, fileMode); err != nil {
		log.Errorf("Failed to change mode of %s to %d: %v", sudoersFile, sudoersFileMode, err)
		return err
	}
	log.Infof("Successfully changed mode of %s to %d", sudoersFile, sudoersFileMode)
	return nil
}
func ( u * SessionUtil ) changeModeOfSudoersFile ( log log . T ) error { fileMode := os . FileMode ( sudoersFileMode ) if err := os . Chmod ( sudoersFile , fileMode ) ; err != nil { log . Errorf ( " " , sudoersFile , sudoersFileMode , err ) return err } log . Infof ( " " , sudoersFile , sudoersFileMode ) return nil }
changeModeOfSudoersFile will change the sudoersFile mode to 0440 (read only).
changeModeOfSudoersFile will change the sudoersFile mode to 0440 ( read only ) .