Home
last modified time | relevance | path

Searched refs:pw_shell (Results 1 – 25 of 58) sorted by relevance

123

/freebsd-13.1/usr.bin/chpass/
H A Dfield.c224 pw->pw_shell = strdup(_PATH_BSHELL); in p_shell()
228 if (!master_mode && pw->pw_shell && !ok_shell(pw->pw_shell)) { in p_shell()
229 warnx("%s: current shell non-standard", pw->pw_shell); in p_shell()
237 pw->pw_shell = strdup(p); in p_shell()
240 pw->pw_shell = dup_shell(p); in p_shell()
241 if (!pw->pw_shell) { in p_shell()
245 if (stat(pw->pw_shell, &sbuf) < 0) { in p_shell()
248 pw->pw_shell); in p_shell()
250 warn("WARNING: can't stat shell '%s'", pw->pw_shell); in p_shell()
255 pw->pw_shell); in p_shell()
[all …]
H A Dedit.c136 *pw->pw_shell ? pw->pw_shell : _PATH_BSHELL); in display()
140 else if (ok_shell(pw->pw_shell)) in display()
146 else if ((!list[E_SHELL].restricted && ok_shell(pw->pw_shell)) || in display()
154 *pw->pw_shell ? pw->pw_shell : _PATH_BSHELL); in display()
/freebsd-13.1/usr.sbin/rpc.yppasswdd/
H A Dyppasswdd_server.c85 pwd->pw_shell = xpwd->pw_shell; in xlate_passwd()
136 EXPAND(yp_password.pw_shell); in copy_yp_pass()
174 if (validchars(npw->pw_shell)) { in validate_master()
220 if (!no_chsh && !ok_shell(npw->pw_shell)) { in validate()
225 if (!no_chsh && validchars(npw->pw_shell)) { in validate()
418 pw->pw_shell); in update_inplace()
424 pw->pw_shell); in update_inplace()
585 if (!no_chsh && strcmp(argp->newpw.pw_shell, yp_password.pw_shell)) { in yppasswdproc_update_1_svc()
586 oldshell = yp_password.pw_shell; in yppasswdproc_update_1_svc()
587 yp_password.pw_shell = argp->newpw.pw_shell; in yppasswdproc_update_1_svc()
[all …]
H A Dyppasswd_private.x51 string pw_shell<>; /* default shell */
/freebsd-13.1/lib/libc/tests/nss/
H A Dgetpw_test.c98 if (src->pw_shell != NULL) in IMPLEMENT_TEST_FILE_SNAPSHOT()
99 dest->pw_shell = strdup(dest->pw_shell); in IMPLEMENT_TEST_FILE_SNAPSHOT()
121 strcmp(pwd1->pw_shell, pwd2->pw_shell) != 0) in compare_passwd()
135 free(pwd->pw_shell); in free_passwd()
144 pwd->pw_dir, pwd->pw_shell, (uintmax_t)pwd->pw_expire, in sdump_passwd()
212 pwd->pw_shell = strdup(s); in passwd_read_snapshot_func()
213 ATF_REQUIRE(pwd->pw_shell != NULL); in passwd_read_snapshot_func()
289 if (pwd->pw_shell == NULL) in passwd_test_correctness()
/freebsd-13.1/usr.sbin/nscd/agents/
H A Dpasswd.c66 if (pwd->pw_shell != NULL) in passwd_marshal_func()
67 desired_size += strlen(pwd->pw_shell) + 1; in passwd_marshal_func()
117 if (new_pwd.pw_shell != NULL) { in passwd_marshal_func()
118 size = strlen(new_pwd.pw_shell); in passwd_marshal_func()
119 memcpy(p, new_pwd.pw_shell, size); in passwd_marshal_func()
120 new_pwd.pw_shell = p; in passwd_marshal_func()
/freebsd-13.1/lib/libutil/
H A Dpw_util.c392 strcmp(pw1->pw_shell, pw2->pw_shell) == 0); in pw_equal()
406 pw->pw_gecos, pw->pw_dir, pw->pw_shell); in pw_make()
420 pw->pw_gecos, pw->pw_dir, pw->pw_shell); in pw_make_v7()
622 if (pw->pw_shell != NULL) in pw_dup()
623 len += strlen(pw->pw_shell) + 1; in pw_dup()
648 if (pw->pw_shell != NULL) { in pw_dup()
649 npw->pw_shell = dst; in pw_dup()
650 dst = stpcpy(npw->pw_shell, pw->pw_shell) + 1; in pw_dup()
/freebsd-13.1/lib/libypclnt/
H A Dypclnt_passwd.c162 (yppwd.newpw.pw_shell = strdup(pwd->pw_shell)) == NULL) { in yppasswd_local()
230 free(yppwd.newpw.pw_shell); in yppasswd_local()
254 (yppwd.newpw.pw_shell = strdup(pwd->pw_shell)) == NULL || in yppasswd_remote()
309 free(yppwd.newpw.pw_shell); in yppasswd_remote()
/freebsd-13.1/contrib/opie/
H A Dopiesu.c164 if (!(thisuser.pw_shell = malloc(strlen(pwd->pw_shell) + 1)))
166 strcpy(thisuser.pw_shell, pwd->pw_shell);
470 if (thisuser.pw_shell && *thisuser.pw_shell)
471 shell = thisuser.pw_shell;
H A Dopielogin.c261 if (!(thisuser.pw_shell = malloc(strlen(pwd->pw_shell) + 1)))
263 strcpy(thisuser.pw_shell, pwd->pw_shell);
691 nouser.pw_name = nouser.pw_gecos = nouser.pw_dir = nouser.pw_shell = "";
1220 if (*thisuser.pw_shell == '\0')
1221 thisuser.pw_shell = "/bin/sh";
1318 setenv("SHELL", thisuser.pw_shell, 1);
1397 if ((namep = strrchr(thisuser.pw_shell, '/')) == NULL)
1398 namep = thisuser.pw_shell;
1454 execlp(thisuser.pw_shell, minusnam, 0);
1455 perror(thisuser.pw_shell);
/freebsd-13.1/usr.bin/login/
H A Dlogin.c451 shell = login_getcapstr(lc, "shell", pwd->pw_shell, pwd->pw_shell); in main()
452 if (*pwd->pw_shell == '\0') in main()
453 pwd->pw_shell = strdup(_PATH_BSHELL); in main()
454 if (pwd->pw_shell == NULL) { in main()
459 shell = pwd->pw_shell; in main()
604 (void)setenv("SHELL", pwd->pw_shell, 1); in main()
658 p = strrchr(pwd->pw_shell, '/'); in main()
659 if (asprintf(&arg0, "-%s", p ? p + 1 : pwd->pw_shell) >= MAXPATHLEN) { in main()
/freebsd-13.1/usr.bin/su/
H A Dsu.c278 if (pwd->pw_shell != NULL && *pwd->pw_shell != '\0') { in main()
280 strlcpy(shellbuf, pwd->pw_shell, in main()
385 if (ruid != 0 && !chshell(pwd->pw_shell)) in main()
388 else if (pwd->pw_shell && *pwd->pw_shell) { in main()
389 shell = pwd->pw_shell; in main()
/freebsd-13.1/crypto/heimdal/appl/su/
H A Dsu.c115 free (p->pw_shell); in free_info()
132 info->pw_shell = strdup(pwd->pw_shell); in dup_info()
134 info->pw_dir == NULL || info->pw_shell == NULL) { in dup_info()
384 shell = login_info->pw_shell; in main()
386 shell = su_info->pw_shell; in main()
/freebsd-13.1/lib/libc/gen/
H A Dpw_scan.c81 pwd->pw_shell = nul; in __pw_initpwd()
200 if (!(pw->pw_shell = strsep(&bp, ":"))) /* shell */ in __pw_scan()
203 p = pw->pw_shell; in __pw_scan()
H A Dgetpwent.c298 if (pwd->pw_shell != NULL) in pwd_marshal_func()
349 if (new_pwd.pw_shell != NULL) { in pwd_marshal_func()
350 size = strlen(new_pwd.pw_shell); in pwd_marshal_func()
352 new_pwd.pw_shell = p; in pwd_marshal_func()
987 STRING(pwd->pw_shell); in pwdb_parse_entry_v3()
1059 STRING(pwd->pw_shell); in pwdb_parse_entry_v4()
1431 free(template->pw_shell); in compat_clear_template()
1457 (template->pw_shell = strdup(src->pw_shell)) == NULL) in compat_set_template()
1486 n += pwd->pw_shell != NULL ? strlen(pwd->pw_shell) + 1 : 0; in compat_use_template()
1507 COPY(pw_shell); in compat_use_template()
[all …]
/freebsd-13.1/usr.bin/logins/
H A Dlogins.c54 char *pw_shell; member
225 pwds[npwds].pw_shell = xstrdup(pwd->pw_shell); in get_users()
317 printf(o_flag ? "%s:%s" : "%24s%s\n", "", pwd->pw_shell); in display_user()
/freebsd-13.1/lib/libc/net/
H A Drcmdsh.c146 if (pw->pw_shell[0] == '\0') in rcmdsh()
149 rshprog = pw->pw_shell; in rcmdsh()
/freebsd-13.1/usr.sbin/jexec/
H A Djexec.c133 *pwd->pw_shell ? pwd->pw_shell : _PATH_BSHELL, 1); in main()
/freebsd-13.1/contrib/llvm-project/lldb/source/Host/posix/
H A DHostInfoPosix.cpp67 return PasswdEntry{user_info_ptr->pw_name, user_info_ptr->pw_shell}; in GetPassword()
76 return PasswdEntry{user_info_ptr->pw_name, user_info_ptr->pw_shell}; in GetPassword()
/freebsd-13.1/include/rpcsvc/
H A Dyppasswd.x64 string pw_shell<>; /* default shell */
/freebsd-13.1/crypto/heimdal/appl/rsh/
H A Drshd.c581 if (asprintf (&e[i++], "SHELL=%s", pwd->pw_shell) == -1) in setup_environment()
714 if (*pwd->pw_shell == '\0') in doit()
715 pwd->pw_shell = _PATH_BSHELL; in doit()
838 execle (pwd->pw_shell, pwd->pw_shell, "-c", cmd, NULL, env); in doit()
839 err(1, "exec %s", pwd->pw_shell); in doit()
/freebsd-13.1/contrib/pf/authpf/
H A Dauthpf.c154 shell = login_getcapstr(lc, "shell", pw->pw_shell, in main()
155 pw->pw_shell); in main()
157 shell = pw->pw_shell; in main()
170 if (shell != pw->pw_shell) in main()
179 if (shell != pw->pw_shell) in main()
/freebsd-13.1/lib/libcasper/services/cap_pwd/tests/
H A Dpwd_test.c137 if (pwd0->pw_shell != NULL || pwd1->pw_shell != NULL) { in passwd_compare()
138 if (pwd0->pw_shell == NULL || pwd1->pw_shell == NULL) in passwd_compare()
140 if (strcmp(pwd0->pw_shell, pwd1->pw_shell) != 0) in passwd_compare()
942 if (pwd->pw_shell != NULL && pwd->pw_shell[0] != '\0') in passwd_fields()
/freebsd-13.1/usr.bin/newgrp/
H A Dnewgrp.c266 shell = pwd->pw_shell; in loginshell()
307 shell = pwd->pw_shell; in doshell()
/freebsd-13.1/include/
H A Dpwd.h123 char *pw_shell; /* default shell */ member

123