Lines Matching refs:username
26 "\t[-f facility] [-p pid_file] [-u username] [-t chrootdir]";
36 {"username", 1, 0, 'u'},
105 char *username = NULL;
184 username = strdup(optarg);
212 if (!username) {
226 /* username will be switched later */
242 if (check_conffile_perm(username, conf_file) < 0) {
264 if (username) {
271 if (drop_root_privileges(username) < 0)
615 drop_root_privileges(const char *username)
618 pw = getpwnam(username);
620 if (initgroups(username, pw->pw_gid) != 0 || setgid(pw->pw_gid) != 0 || setuid(pw->pw_uid) != 0) {
622 username, pw->pw_uid, pw->pw_gid);
627 flog(LOG_ERR, "Couldn't find user '%.32s'", username);
634 check_conffile_perm(const char *username, const char *conf_file)
650 if (!username)
651 username = "root";
653 pw = getpwnam(username);
664 if (strncmp(username, "root", 5) != 0 &&