Home
last modified time | relevance | path

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

12345678910>>...20

/external/toybox/toys/pending/
Duseradd.c45 struct passwd pwd; local
64 pwd.pw_name = s;
65 pwd.pw_passwd = "x";
66 pwd.pw_gecos = TT.gecos ? TT.gecos : "Linux User,";
67 pwd.pw_dir = TT.dir ? TT.dir : xmprintf("/home/%s", *toys.optargs);
79 pwd.pw_shell = TT.shell;
90 pwd.pw_uid = TT.uid;
97 if (getgrnam(pwd.pw_name)) error_exit("group '%s' in use", pwd.pw_name);
101 pwd.pw_gid = TT.gid;
105 char *s = xmprintf("-g%ld", (long)pwd.pw_gid);
[all …]
Dcrontab.c266 static void do_edit(struct passwd *pwd) in do_edit() argument
278 snprintf(toybuf, sizeof(toybuf), "%s%s", TT.cdir, pwd->pw_name); in do_edit()
286 } else printf("No crontab for '%s'- using an empty one\n", pwd->pw_name); in do_edit()
293 char *prog = pwd->pw_shell; in do_edit()
295 xsetuser(pwd); in do_edit()
296 if (pwd->pw_uid) { in do_edit()
297 if (setenv("USER", pwd->pw_name, 1)) _exit(1); in do_edit()
298 if (setenv("LOGNAME", pwd->pw_name, 1)) _exit(1); in do_edit()
300 if (setenv("HOME", pwd->pw_dir, 1)) _exit(1); in do_edit()
332 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/autotest/client/tests/cgroup/
Dcgroup_common.py54 pwd = mkdtemp(prefix='cgroup-', dir=root) + '/'
56 pwd = mkdtemp(prefix='cgroup-', dir=self.root) + '/'
60 return pwd
63 def rm_cgroup(self, pwd, supress=False): argument
72 os.rmdir(pwd)
95 def is_cgroup(self, pid, pwd): argument
102 if open(pwd + '/tasks').readlines().count("%d\n" % pid) > 0:
117 def set_cgroup(self, pid, pwd): argument
125 open(pwd+'/tasks', 'w').write(str(pid))
129 if self.is_cgroup(pid, pwd):
[all …]
Dcgroup.py83 if item.rm_cgroup(pwd):
102 pwd = item.mk_cgroup()
103 if pwd == None:
173 if item.set_cgroup(ps.pid, pwd):
175 if item.set_prop("memory.limit_in_bytes", ("%dM" % (mem/2)), pwd):
221 if item.set_cgroup(ps.pid, pwd):
223 if item.set_prop("memory.memsw.limit_in_bytes", "%dM"%(mem/2), pwd):
333 if item.rm_cgroup(pwd):
357 pwd = item.mk_cgroup()
358 if pwd == None:
[all …]
/external/toybox/toys/other/
Dlogin.c43 struct passwd *pwd = 0; in login_main() local
74 if ((pwd = getpwnam(username))) { in login_main()
76 if (TT.f || !*pwd->pw_passwd) break; in login_main()
79 if (*(pass = pwd->pw_passwd) == 'x') { in login_main()
95 syslog(LOG_WARNING, "invalid password for '%s' on %s %s%s", pwd->pw_name, in login_main()
102 pwd = 0; in login_main()
106 if (!pwd) error_exit("max retries (3)"); in login_main()
110 if (pwd->pw_uid && !access("/etc/nologin", R_OK)) { in login_main()
119 if (fchown(tty, pwd->pw_uid, pwd->pw_gid) || fchmod(tty, 0600)) in login_main()
121 xsetuser(pwd); in login_main()
[all …]
/external/python/cpython3/Lib/test/
Dtest_pwd.py5 pwd = support.import_module('pwd') variable
7 @unittest.skipUnless(hasattr(pwd, 'getpwall'), 'Does not have getpwall()')
11 entries = pwd.getpwall()
37 entries = pwd.getpwall()
53 self.assertIn(pwd.getpwnam(e.pw_name), entriesbyname[e.pw_name])
54 self.assertIn(pwd.getpwuid(e.pw_uid), entriesbyuid[e.pw_uid])
57 self.assertRaises(TypeError, pwd.getpwuid)
58 self.assertRaises(TypeError, pwd.getpwuid, 3.14)
59 self.assertRaises(TypeError, pwd.getpwnam)
60 self.assertRaises(TypeError, pwd.getpwnam, 42)
[all …]
/external/python/cpython2/Lib/test/
Dtest_pwd.py5 pwd = test_support.import_module('pwd') variable
10 entries = pwd.getpwall()
36 entries = pwd.getpwall()
52 self.assertIn(pwd.getpwnam(e.pw_name), entriesbyname[e.pw_name])
53 self.assertIn(pwd.getpwuid(e.pw_uid), entriesbyuid[e.pw_uid])
56 self.assertRaises(TypeError, pwd.getpwuid)
57 self.assertRaises(TypeError, pwd.getpwuid, 3.14)
58 self.assertRaises(TypeError, pwd.getpwnam)
59 self.assertRaises(TypeError, pwd.getpwnam, 42)
60 self.assertRaises(TypeError, pwd.getpwall, 42)
[all …]
/external/curl/tests/
Dtestcurl.pl69 use vars qw($version $fixed $infixed $CURLDIR $git $pwd $build $buildlog
234 chdir $pwd; # cd back to the original root dir
236 if ($pwd && $build) {
239 rmtree "$pwd/$build";
252 my $configfile = "$pwd/$build/lib/curl_config.h";
371 $pwd = getcwd();
397 $buildlog="$pwd/$buildlogname";
554 chdir "$pwd/$build";
662 s/$pwd//g;
674 chdir "$pwd/$build";
[all …]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/
D5-1.c34 struct passwd *pwd; in main()
36 pwd = getpwnam("nobody"); in main()
37 if (pwd != NULL) { in main()
38 setgid(pwd->pw_gid); in main()
39 setuid(pwd->pw_uid); in main()
/external/conscrypt/common/src/main/java/org/conscrypt/
DKeyManagerFactoryImpl.java45 private char[] pwd; field in KeyManagerFactoryImpl
57 pwd = password.clone(); in engineInit()
59 pwd = EmptyArray.CHAR; in engineInit()
76 pwd = EmptyArray.CHAR; in engineInit()
78 pwd = keyStorePwd.toCharArray(); in engineInit()
83 keyStore.load(fis, pwd); in engineInit()
118 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/conscrypt/repackaged/common/src/main/java/com/android/org/conscrypt/
DKeyManagerFactoryImpl.java47 private char[] pwd; field in KeyManagerFactoryImpl
59 pwd = password.clone(); in engineInit()
61 pwd = EmptyArray.CHAR; in engineInit()
78 pwd = EmptyArray.CHAR; in engineInit()
80 pwd = keyStorePwd.toCharArray(); in engineInit()
85 keyStore.load(fis, pwd); in engineInit()
120 return new KeyManager[] { new KeyManagerImpl(keyStore, pwd) }; in engineGetKeyManagers()
DDefaultSSLContextImpl.java73 char[] pwd = (keystorepwd == null) ? null : keystorepwd.toCharArray(); in getKeyManagers() local
79 ks.load(is, pwd); in getKeyManagers()
88 kmf.init(ks, pwd); in getKeyManagers()
105 char[] pwd = (keystorepwd == null) ? null : keystorepwd.toCharArray(); in getTrustManagers() local
112 ks.load(is, pwd); in getTrustManagers()
/external/selinux/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)) puts(s); in pwd_main()
50 free(pwd); in pwd_main()
/external/iptables/extensions/
Dlibxt_owner.c143 struct passwd *pwd; in owner_mt_parse_v0() local
150 if ((pwd = getpwnam(cb->arg)) != NULL) in owner_mt_parse_v0()
151 id = pwd->pw_uid; in owner_mt_parse_v0()
190 struct passwd *pwd; in owner_mt6_parse_v0() local
197 if ((pwd = getpwnam(cb->arg)) != NULL) in owner_mt6_parse_v0()
198 id = pwd->pw_uid; in owner_mt6_parse_v0()
248 struct passwd *pwd; in owner_mt_parse() local
255 if ((pwd = getpwnam(cb->arg)) != NULL) in owner_mt_parse()
256 from = to = pwd->pw_uid; in owner_mt_parse()
310 struct passwd *pwd = getpwuid(info->uid); in owner_mt_print_item_v0() local
[all …]
/external/libbrillo/brillo/
Duserdb_utils.cc26 passwd* pwd = nullptr; in GetUserInfo() local
31 err_num = getpwnam_r(user.c_str(), &pwd_buf, buf.data(), buf_len, &pwd); in GetUserInfo()
34 if (!pwd) { in GetUserInfo()
42 *uid = pwd->pw_uid; in GetUserInfo()
44 *gid = pwd->pw_gid; in GetUserInfo()
/external/autotest/client/deps/libnet/
Dlibnet.py21 pwd = os.getcwd() variable
22 tarball = os.path.join(pwd, 'libnet.tar.gz')
23 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd)
/external/autotest/client/deps/pgsql/
Dpgsql.py20 pwd = os.getcwd() variable
21 tarball = os.path.join(pwd, 'postgresql-8.3.1.tar.bz2')
22 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd)
/external/autotest/client/deps/pgpool/
Dpgpool.py25 pwd = os.getcwd() variable
26 tarball = os.path.join(pwd, 'pgpool-II-1.0.1.tar.gz')
27 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd)
/external/autotest/client/deps/mysql/
Dmysql.py34 pwd = os.getcwd() variable
35 tarball = os.path.join(pwd, 'mysql-5.0.45.tar.gz')
36 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd)
/external/flac/test/
Dcommon.sh.in29 LD_LIBRARY_PATH=`pwd`/../objs/$BUILD/lib:$LD_LIBRARY_PATH
30 LD_LIBRARY_PATH=`pwd`/../src/libFLAC/.libs:$LD_LIBRARY_PATH
31 LD_LIBRARY_PATH=`pwd`/../src/share/getopt/.libs:$LD_LIBRARY_PATH
32 LD_LIBRARY_PATH=`pwd`/../src/share/grabbag/.libs:$LD_LIBRARY_PATH
33 LD_LIBRARY_PATH=`pwd`/../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH
34 LD_LIBRARY_PATH=`pwd`/../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH
35 LD_LIBRARY_PATH=`pwd`/../src/share/utf8/.libs:$LD_LIBRARY_PATH
/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()

12345678910>>...20