_id stringlengths 2 7 | text stringlengths 6 2.61k | title stringclasses 1
value |
|---|---|---|
c172500 | // Sets environment variables and a null logger. | |
c172501 | // StartLogger initializes the log file. | |
c172502 | // openDBFile opens a file. | |
c172503 | // backup does a backup of a file. | |
c172504 | // New returns the interface to handle the package manager. | |
c172505 | // RegisterCrypt registers a function that returns a new instance of the given
// crypt function. This is intended to be called from the init function in
// packages that implement crypt functions. | |
c172506 | // New returns a new crypter. | |
c172507 | // Text returns the most recents tokens generated by a call to Scan as a newly
// allocated string holding its bytes. | |
c172508 | // Exec executes a command setting both standard input, output and error. | |
c172509 | // ExecSudo executes a command under "sudo". | |
c172510 | // nextUID returns the next free user id to use, according to whether it is a
// system's user. | |
c172511 | // nextGUID returns the next free group id to use, according to whether it is a
// system's group. | |
c172512 | // NextSystemUID returns the next free system user id to use. | |
c172513 | // NextSystemGID returns the next free system group id to use. | |
c172514 | // NextUID returns the next free user id to use. | |
c172515 | // NextGID returns the next free group id to use. | |
c172516 | // NewShadow returns a structure Shadow with fields "Min", "Max" and "Warn"
// got from the system configuration, and enabling the features of password aging. | |
c172517 | // parseShadow parses the row of a shadowed password. | |
c172518 | // LookupShadow looks for the entry for the given user name. | |
c172519 | // == Editing
//
// Add adds a new shadowed user.
// If the key is not nil, generates a hashed password.
//
// It is created a backup before of modify the original file. | |
c172520 | // Copy copies file in source to file in dest preserving the mode attributes. | |
c172521 | // Create creates a new file with b bytes. | |
c172522 | // loadConfig loads user configuration.
// It has to be loaded before of edit some file. | |
c172523 | // NewEdit opens a file to edit; it is created a backup. | |
c172524 | // AppendString is like Append, but writes the contents of string s rather than
// an array of bytes. | |
c172525 | // Comment inserts the comment character in lines that mach any regular expression
// in reLine. | |
c172526 | // CommentOut removes the comment character of lines that mach any regular expression
// in reLine. | |
c172527 | // CommentM inserts the comment character in lines that mach any regular expression
// in reLine, in the named file. | |
c172528 | // CommentOutM removes the comment character of lines that mach any regular expression
// in reLine, in the named file. | |
c172529 | // ReplaceN replaces a number of regular expressions mathed in r for the named
// file. | |
c172530 | // ReplaceAtLine replaces all regular expressions mathed in r for the named
// file, if the line is matched at the first. | |
c172531 | // ReplaceAtLineN replaces a number of regular expressions mathed in r for the
// named file, if the line is matched at the first. | |
c172532 | // Sets the settings files of the caller. | |
c172533 | // getSettingsForUid returns the settings files of the given user id. | |
c172534 | // == Set variables
//
// _Set sets the value named by the key in the given filename. | |
c172535 | // _MSet sets multiple values named by the keys in the given filename. | |
c172536 | // == Set session-wide variables
// Set sets the value of the environment variable named by the key that
// affects the current user.
// It returns an error, if any. | |
c172537 | // MSet sets multiple values of the environment variables named by the keys
// that affects the current user.
// It returns an error, if any. | |
c172538 | // SetForUid sets the value of the environment variable named by the key that
// affects a particular user.
// It returns an error, if any. | |
c172539 | // MSetForUid sets multiple values of the environment variables named by the
// keys that affects a particular user.
// It returns an error, if any. | |
c172540 | // == Set system-wide variables
// Setsys sets the value of the environment variable named by the key that
// affects the system as a whole. You must be Root.
// It returns an error, if any. | |
c172541 | // MSetsys sets multiple values of the environment variables named by the keys
// that affects the system as a whole. You must be Root.
// It returns an error, if any. | |
c172542 | // SetsysForUid sets the value of the environment variable named by the key that
// affects the system as a whole. You must be Root.
// It returns an error, if any. | |
c172543 | // MSetsysForUid sets multiple values of the environment variables named by the
// keys that affects the system as a whole. You must be Root.
// It returns an error, if any. | |
c172544 | // NewGShadow returns a new GShadow. | |
c172545 | // parseGShadow parses the row of a group shadow. | |
c172546 | // == Lookup
//
// lookUp parses the shadowed group line searching a value into the field.
// Returns nil if it isn't found. | |
c172547 | // LookupGShadow looks up a shadowed group by name. | |
c172548 | // == Editing
//
// Add adds a new shadowed group.
// If the key is not nil, generates a hashed password.
//
// It is created a backup before of modify the original file. | |
c172549 | // NewUser returns a new User with both fields "Dir" and "Shell" got from
// the system configuration. | |
c172550 | // NewSystemUser returns a new system user. | |
c172551 | // IsOfSystem indicates whether it is a system user. | |
c172552 | // parseUser parses the row of an user. | |
c172553 | // == Lookup
//
// lookUp parses the user line searching a value into the field.
// Returns nil if is not found. | |
c172554 | // LookupUID looks up an user by user ID. | |
c172555 | // LookupUser looks up an user by name. | |
c172556 | // GetUsername returns the user name from the password database for the actual
// process.
// It panics whther there is an error at searching the UID. | |
c172557 | // GetUsernameFromEnv returns the user name from the environment variable
// for the actual process. | |
c172558 | // == Editing
//
// AddUser adds an user to both user and shadow files. | |
c172559 | // AddSystemUser adds a system user to both user and shadow files. | |
c172560 | // Add adds a new user.
// Whether UID is < 0, it will choose the first id available in the range set
// in the system configuration. | |
c172561 | // DelUser removes an user from the system. | |
c172562 | // ParseFile creates a new Config and parses the file configuration from the
// named file. | |
c172563 | // Print outputs the keys and values parsed. | |
c172564 | // Getbool returns the boolean value for a given key. | |
c172565 | // Getint returns the integer value for a given key. | |
c172566 | // Getuint returns the unsigned integer value for a given key. | |
c172567 | // Getfloat returns the float value for a given key. | |
c172568 | // Run executes external commands just like RunWithMatch, but does not return
// the boolean `match`. | |
c172569 | // NewInfo returns a info describing the named file. | |
c172570 | // OwnerHas reports whether the owner has all given permissions. | |
c172571 | // GroupHas reports whether the group has all given permissions. | |
c172572 | // OthersHave reports whether the others have all given permissions. | |
c172573 | // OwnerHas reports whether the named file has all given permissions for the owner. | |
c172574 | // lookupCrypter returns the first crypt function found in shadowed passwd file. | |
c172575 | // Passwd sets a hashed passwd for the actual user.
// The passwd must be supplied in clear-text. | |
c172576 | // Passwd sets a hashed passwd for the actual group.
// The passwd must be supplied in clear-text. | |
c172577 | // == Change passwd
// ChPasswd updates passwd.
// The passwd must be supplied in clear-text. | |
c172578 | // ChGPasswd updates group passwd.
// The passwd must be supplied in clear-text. | |
c172579 | // == Locking
// LockUser locks the passwd of the given user. | |
c172580 | // AddGroup returns a new Group. | |
c172581 | // NewSystemGroup adds a system group. | |
c172582 | // IsOfSystem indicates whether it is a system group. | |
c172583 | // parseGroup parses the row of a group. | |
c172584 | // == Lookup
//
// lookUp parses the group line searching a value into the field.
// Returns nil if it is not found. | |
c172585 | // LookupGID looks up a group by group ID. | |
c172586 | // LookupGroup looks up a group by name. | |
c172587 | // Getgroups returns a list of the numeric ids of groups that the caller
// belongs to. | |
c172588 | // GetgroupsName returns a list of the groups that the caller belongs to. | |
c172589 | // == Editing
//
// AddGroup adds a group. | |
c172590 | // AddSystemGroup adds a system group. | |
c172591 | // Add adds a new group.
// Whether GID is < 0, it will choose the first id available in the range set
// in the system configuration. | |
c172592 | // DelGroup removes a group from the system. | |
c172593 | // AddUsersToGroup adds the members to a group. | |
c172594 | // DelUsersInGroup removes the specific members from a group. | |
c172595 | // == Utility
//
// checkGroup indicates if a value is into a group. | |
c172596 | // Detect returns the Linux distribution. | |
c172597 | // AddSystem adds the given System to the World, sorted by priority. | |
c172598 | // AddSystemInterface adds a system to the world, but also adds a filter that allows
// automatic adding of entities that match the provided in interface, and excludes any
// that match the provided ex interface, even if they also match in. in and ex must be
// pointers to the interface or else this panics. | |
c172599 | // AddEntity adds the entity to all systems that have been added via
// AddSystemInterface. If the system was added via AddSystem the entity will not be
// added to it. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.