Home
last modified time | relevance | path

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

12345678910>>...14

/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.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/toybox/toys/other/
Dlogin.c52 struct passwd *pwd = 0; in login_main() local
87 pwd = getpwnam(username); in login_main()
88 if (pwd && *pwd->pw_passwd != '!' && *pwd->pw_passwd != '*') { in login_main()
91 if (TT.username || !*pwd->pw_passwd) break; in login_main()
94 if (*(pass = pwd->pw_passwd) == 'x') { in login_main()
110 syslog(LOG_WARNING, "invalid password for '%s' on %s %s%s", pwd->pw_name, in login_main()
117 pwd = 0; in login_main()
124 if (!pwd) error_exit("max retries (3)"); in login_main()
128 if (pwd->pw_uid && !access("/etc/nologin", R_OK)) { in login_main()
137 xsetuser(pwd); in login_main()
[all …]
/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/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";
562 chdir "$pwd/$build";
685 s/$pwd//g;
697 chdir "$pwd/$build";
[all …]
/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()
81 keyStore.load(new FileInputStream(new File(keyStoreName)), pwd); in engineInit()
114 return new KeyManager[] { new KeyManagerImpl(keyStore, pwd) }; in engineGetKeyManagers()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/
D5-1.c35 struct passwd *pwd; in main()
37 pwd = getpwnam("nobody"); in main()
38 if (pwd != NULL) { in main()
39 setgid(pwd->pw_gid); in main()
40 setuid(pwd->pw_uid); in main()
/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/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/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/libbrillo/brillo/
Duserdb_utils.cc24 passwd* pwd = nullptr; in GetUserInfo() local
26 if (getpwnam_r(user.c_str(), &pwd_buf, buf.data(), buf_len, &pwd) || !pwd) { in GetUserInfo()
32 *uid = pwd->pw_uid; in GetUserInfo()
34 *gid = pwd->pw_gid; in GetUserInfo()
/external/syslinux/com32/modules/
Dpwd.c37 char pwd[PATH_MAX], *pwdptr; in main() local
39 pwdptr = getcwd(pwd, PATH_MAX); in main()
41 if (pwd[0] != 0) in main()
42 puts(pwd); in main()
/external/autotest/client/deps/dejagnu/
Ddejagnu.py18 pwd = os.getcwd() variable
20 tarball = os.path.join(pwd, 'dejagnu-1.4.4.tar.bz2')
21 utils.update_version(pwd+'/src', False, version, setup, tarball, pwd)
/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/toybox/toys/lsb/
Dpasswd.c70 static int verify_passwd(char * pwd) in verify_passwd() argument
74 if (!pwd) return 1; in verify_passwd()
75 if (pwd[0] == '!' || pwd[0] == '*') return 1; in verify_passwd()
77 pass = crypt(toybuf, pwd); in verify_passwd()
78 if (pass && !strcmp(pass, pwd)) return 0; in verify_passwd()
/external/tpm2/fuzz/
DREADME16 $ docker run -ti --rm -v $(pwd):/src/tpm2 -v /tmp/fuzzers:/out \
21 $ docker run -ti -v $(pwd)/fuzz/corpus-execute-command:/corpus \
33 $ docker run -ti --rm -v $(pwd):/src/tpm2 -v /tmp/fuzzers:/out \
37 $ docker run -ti --rm -v $(pwd):/src/tpm2 -v /tmp/fuzzers:/out \
47 -v $(pwd):/src/tpm2 \
/external/autotest/client/site_tests/firmware_TouchMTB/tests/
Dcommon_unittest_utils.py13 pwd = os.getcwd()
15 if os.path.basename(pwd) != project:
20 sys.path.append(pwd)
22 sys.path.append(os.path.join(pwd, '../../bin/input/'))
/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>>...14