Home
last modified time | relevance | path

Searched refs:pwd (Results 1 – 25 of 198) sorted by relevance

12345678

/external/toybox/toys/other/
Dlogin.c48 int verify_password(char * pwd) in verify_password() argument
53 if (!pwd) return 1; in verify_password()
54 if (pwd[0] == '!' || pwd[0] == '*') return 1; in verify_password()
56 pass = crypt(toybuf, pwd); in verify_password()
57 if (pass && !strcmp(pass, pwd)) return 0; in verify_password()
127 void setup_environment(const struct passwd *pwd, int clear_env) in setup_environment() argument
129 if (chdir(pwd->pw_dir)) printf("bad home dir: %s\n", pwd->pw_dir); in setup_environment()
137 setenv("USER", pwd->pw_name, 1); in setup_environment()
138 setenv("LOGNAME", pwd->pw_name, 1); in setup_environment()
139 setenv("HOME", pwd->pw_dir, 1); in setup_environment()
[all …]
/external/toybox/toys/pending/
Duseradd.c45 struct passwd pwd; local
67 pwd.pw_name = s;
68 pwd.pw_passwd = "x";
69 pwd.pw_gecos = TT.gecos ? TT.gecos : "Linux User,";
70 pwd.pw_dir = TT.dir ? TT.dir : xmprintf("/home/%s", *toys.optargs);
82 pwd.pw_shell = TT.shell;
93 pwd.pw_uid = TT.uid;
100 if (getgrnam(pwd.pw_name)) error_exit("group '%s' in use", pwd.pw_name);
104 pwd.pw_gid = TT.gid;
108 char *s = xmprintf("-g%ld", pwd.pw_gid);
[all …]
Dcrontab.c263 static void do_edit(struct passwd *pwd) in do_edit() argument
275 snprintf(toybuf, sizeof(toybuf), "%s%s", TT.cdir, pwd->pw_name); in do_edit()
283 } else printf("No crontab for '%s'- using an empty one\n", pwd->pw_name); in do_edit()
290 char *prog = pwd->pw_shell; in do_edit()
292 xsetuser(pwd); in do_edit()
293 if (pwd->pw_uid) { in do_edit()
294 if (setenv("USER", pwd->pw_name, 1)) _exit(1); in do_edit()
295 if (setenv("LOGNAME", pwd->pw_name, 1)) _exit(1); in do_edit()
297 if (setenv("HOME", pwd->pw_dir, 1)) _exit(1); in do_edit()
329 update_crontab(tname, pwd->pw_name); in do_edit()
[all …]
Dsulogin.c39 static int validate_password(char *pwd) in validate_password() argument
63 pass = crypt(toybuf, pwd); in validate_password()
65 if( pass && !strcmp(pass, pwd)) ret = 0; in validate_password()
79 struct passwd *pwd = NULL; in sulogin_main() local
100 if (!(pwd = getpwuid(0))) error_exit("invalid user"); in sulogin_main()
101 pass = pwd->pw_passwd; in sulogin_main()
104 if ((spwd = getspnam (pwd->pw_name))) pass = spwd->sp_pwdp; in sulogin_main()
116 || (shell = pwd->pw_shell)) in sulogin_main()
Duserdel.c94 struct passwd *pwd = NULL; in userdel_main() local
96 pwd = xgetpwnam(*toys.optargs); in userdel_main()
97 update_password("/etc/passwd", pwd->pw_name, NULL); in userdel_main()
98 update_password("/etc/shadow", pwd->pw_name, NULL); in userdel_main()
110 char *arg[] = {"rm", "-fr", pwd->pw_dir, NULL, NULL}; in userdel_main()
112 sprintf(toybuf, "/var/spool/mail/%s",pwd->pw_name); in userdel_main()
/external/linux-tools-perf/src/tools/perf/util/
Dabspath.c6 char *pwd; in get_pwd_cwd() local
10 pwd = getenv("PWD"); in get_pwd_cwd()
11 if (pwd && strcmp(pwd, cwd)) { in get_pwd_cwd()
13 if (!stat(pwd, &pwd_stat) && in get_pwd_cwd()
16 strlcpy(cwd, pwd, PATH_MAX); in get_pwd_cwd()
/external/conscrypt/src/main/java/org/conscrypt/
DKeyManagerFactoryImpl.java44 private char[] pwd; field in KeyManagerFactoryImpl
56 pwd = password.clone(); in engineInit()
58 pwd = EmptyArray.CHAR; in engineInit()
75 pwd = EmptyArray.CHAR; in engineInit()
77 pwd = keyStorePwd.toCharArray(); in engineInit()
80 keyStore.load(new FileInputStream(new File(keyStoreName)), pwd); in engineInit()
113 return new KeyManager[] { new KeyManagerImpl(keyStore, pwd) }; in engineGetKeyManagers()
DDefaultSSLContextImpl.java72 char[] pwd = (keystorepwd == null) ? null : keystorepwd.toCharArray(); in getKeyManagers() local
78 ks.load(is, pwd); in getKeyManagers()
87 kmf.init(ks, pwd); in getKeyManagers()
104 char[] pwd = (keystorepwd == null) ? null : keystorepwd.toCharArray(); in getTrustManagers() local
111 ks.load(is, pwd); in getTrustManagers()
/external/iptables/extensions/
Dlibxt_owner.c140 struct passwd *pwd; in owner_mt_parse_v0() local
147 if ((pwd = getpwnam(cb->arg)) != NULL) in owner_mt_parse_v0()
148 id = pwd->pw_uid; in owner_mt_parse_v0()
187 struct passwd *pwd; in owner_mt6_parse_v0() local
194 if ((pwd = getpwnam(cb->arg)) != NULL) in owner_mt6_parse_v0()
195 id = pwd->pw_uid; in owner_mt6_parse_v0()
245 struct passwd *pwd; in owner_mt_parse() local
252 if ((pwd = getpwnam(cb->arg)) != NULL) in owner_mt_parse()
253 from = to = pwd->pw_uid; in owner_mt_parse()
302 struct passwd *pwd = getpwuid(info->uid); in owner_mt_print_item_v0() local
[all …]
/external/selinux/policycoreutils/sandbox/
Dseunshare.c382 struct passwd *pwd, int copy_content) in cleanup_tmpdir() argument
394 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) { in cleanup_tmpdir()
408 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) rc++; in cleanup_tmpdir()
419 if ((uid_t)setfsuid(pwd->pw_uid) != 0) { in cleanup_tmpdir()
434 struct stat *out_st, struct passwd *pwd, security_context_t execcon) in create_tmpdir() argument
444 if ((uid_t)setfsuid(pwd->pw_uid) != 0) in create_tmpdir()
465 if ((uid_t)setfsuid(0) != pwd->pw_uid) in create_tmpdir()
469 if (asprintf(&tmpdir, "/tmp/.sandbox-%s-XXXXXX", pwd->pw_name) == -1) { in create_tmpdir()
521 if ((uid_t)setfsuid(pwd->pw_uid) != 0) in create_tmpdir()
529 if ((uid_t)setfsuid(0) != pwd->pw_uid) in create_tmpdir()
[all …]
/external/toybox/toys/posix/
Dpwd.c26 char *s, *pwd = getcwd(0, 0), *PWD; in pwd_main() local
43 if (s && pwd) in pwd_main()
44 if (stat(pwd, &st1) || stat(PWD, &st2) || st1.st_ino != st2.st_ino || in pwd_main()
49 if (!s && !(s = pwd)) perror_exit("xgetcwd"); in pwd_main()
53 if (CFG_TOYBOX_FREE) free(pwd); in pwd_main()
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/java/security/
DKeyStore_Impl3Test.java114 char[] pwd = { 'p', 'a', 's', 's', 'w', 'd' }; in testLoadStore01() local
115 KeyStore.PasswordProtection pPath = new KeyStore.PasswordProtection(pwd); in testLoadStore01()
134 kss[i].setKeyEntry(aliases[3], pk, pwd, certs); in testLoadStore01()
138 kss[i].store(null, pwd); in testLoadStore01()
147 kss[i].store(bos, pwd); in testLoadStore01()
150 kss1[i].load(bis, pwd); in testLoadStore01()
190 assertEquals("Incorrect entry", kss[i].getKey(aliases[3], pwd), in testLoadStore01()
191 kss1[i].getKey(aliases[3], pwd)); in testLoadStore01()
DKeyStore_Impl1Test.java467 char[] pwd = { 'p', 'a', 's', 's', 'w', 'd' }; in testEntry02() local
468 KeyStore.PasswordProtection pPath = new KeyStore.PasswordProtection(pwd); in testEntry02()
507 key = kss[i].getKey(aliases[j], pwd); in testEntry02()
580 char[] pwd = { 'p', 'a', 's', 's', 'w', 'd' }; in testEntry03() local
581 KeyStore.PasswordProtection pPath = new KeyStore.PasswordProtection(pwd); in testEntry03()
603 key1 = kss[i].getKey(aliases[j], pwd); in testEntry03()
730 char[] pwd = new char[0]; in testEntry05() local
741 kss[i].setKeyEntry("ZZZ", null, pwd, certs); in testEntry05()
746 kss[i].setKeyEntry("ZZZ", key, pwd, null); in testEntry05()
752 kss[i].setKeyEntry("ZZZ", key, pwd, in testEntry05()
[all …]
/external/toybox/toys/lsb/
Dpasswd.c63 static int verify_passwd(char * pwd) in verify_passwd() argument
67 if (!pwd) return 1; in verify_passwd()
68 if (pwd[0] == '!' || pwd[0] == '*') return 1; in verify_passwd()
70 pass = crypt(toybuf, pwd); in verify_passwd()
71 if (pass && !strcmp(pass, pwd)) return 0; in verify_passwd()
/external/selinux/libselinux/utils/
Dtogglesebool.c81 struct passwd *pwd = getpwuid(getuid()); in main() local
83 if (pwd && pwd->pw_name) in main()
86 argv[i], pwd->pw_name); in main()
/external/ipsec-tools/src/racoon/
Disakmp_xauth.c229 outlet = &xst->authdata.generic.pwd;
254 (xst->authdata.generic.pwd != NULL)) {
258 char *pwd = xst->authdata.generic.pwd; local
263 "Got username \"%s\", password \"%s\"\n", usr, pwd);
277 res = privsep_xauth_login_system(usr, pwd);
281 res = xauth_login_radius(iph1, usr, pwd);
287 iph1->remote, usr, pwd);
292 res = xauth_login_ldap(iph1, usr, pwd);
496 xauth_login_radius(iph1, usr, pwd) in xauth_login_radius() argument
499 char *pwd;
[all …]
/external/lldb/examples/customization/pwd-cd-and-system/
DREADME6 following commands: 'pwd', 'cd', and 'system'.
19 file imports the utils Python module and adds the 'pwd', 'cd', and 'system'
22 Johnnys-MacBook-Pro:multiple_threads johnny$ pwd
25 (lldb) pwd
/external/mockftpserver/tags/1.1/src/test/java/org/mockftpserver/stub/
DStubFtpServer_StartTest.java60 PwdCommandHandler pwd = new PwdCommandHandler(); in testCustomServerControlPort() local
61 pwd.setDirectory(DIR); in testCustomServerControlPort()
65 stubFtpServer.setCommandHandler(CommandNames.PWD, pwd); in testCustomServerControlPort()
/external/mockftpserver/tags/1.2.2/src/test/java/org/mockftpserver/stub/
DStubFtpServer_StartTest.java62 PwdCommandHandler pwd = new PwdCommandHandler(); in testCustomServerControlPort() local
63 pwd.setDirectory(DIR); in testCustomServerControlPort()
67 stubFtpServer.setCommandHandler(CommandNames.PWD, pwd); in testCustomServerControlPort()
/external/mockftpserver/tags/1.2.3/src/test/java/org/mockftpserver/stub/
DStubFtpServer_StartTest.java62 PwdCommandHandler pwd = new PwdCommandHandler(); in testCustomServerControlPort() local
63 pwd.setDirectory(DIR); in testCustomServerControlPort()
67 stubFtpServer.setCommandHandler(CommandNames.PWD, pwd); in testCustomServerControlPort()
/external/mockftpserver/tags/2.x_Before_IDEA/src/test/java/org/mockftpserver/stub/
DStubFtpServer_StartTest.java62 PwdCommandHandler pwd = new PwdCommandHandler(); in testCustomServerControlPort() local
63 pwd.setDirectory(DIR); in testCustomServerControlPort()
67 stubFtpServer.setCommandHandler(CommandNames.PWD, pwd); in testCustomServerControlPort()
/external/mockftpserver/tags/1.2.4/src/test/java/org/mockftpserver/stub/
DStubFtpServer_StartTest.java62 PwdCommandHandler pwd = new PwdCommandHandler(); in testCustomServerControlPort() local
63 pwd.setDirectory(DIR); in testCustomServerControlPort()
67 stubFtpServer.setCommandHandler(CommandNames.PWD, pwd); in testCustomServerControlPort()
/external/mockftpserver/tags/1.2/src/test/java/org/mockftpserver/stub/
DStubFtpServer_StartTest.java62 PwdCommandHandler pwd = new PwdCommandHandler(); in testCustomServerControlPort() local
63 pwd.setDirectory(DIR); in testCustomServerControlPort()
67 stubFtpServer.setCommandHandler(CommandNames.PWD, pwd); in testCustomServerControlPort()
/external/mockftpserver/tags/1.2.1/src/test/java/org/mockftpserver/stub/
DStubFtpServer_StartTest.java62 PwdCommandHandler pwd = new PwdCommandHandler(); in testCustomServerControlPort() local
63 pwd.setDirectory(DIR); in testCustomServerControlPort()
67 stubFtpServer.setCommandHandler(CommandNames.PWD, pwd); in testCustomServerControlPort()
/external/mockftpserver/branches/1.x_Branch/src/test/java/org/mockftpserver/stub/
DStubFtpServer_StartTest.java62 PwdCommandHandler pwd = new PwdCommandHandler(); in testCustomServerControlPort() local
63 pwd.setDirectory(DIR); in testCustomServerControlPort()
67 stubFtpServer.setCommandHandler(CommandNames.PWD, pwd); in testCustomServerControlPort()

12345678