/third_party/toybox/toys/pending/ |
D | useradd.c | 45 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 …]
|
D | crontab.c | 266 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 …]
|
D | sulogin.c | 39 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()
|
D | userdel.c | 93 struct passwd *pwd = xgetpwnam(*toys.optargs); in userdel_main() local 95 update_password("/etc/passwd", pwd->pw_name, NULL); in userdel_main() 96 update_password("/etc/shadow", pwd->pw_name, NULL); in userdel_main() 108 char *arg[] = {"rm", "-fr", pwd->pw_dir, NULL, NULL}; in userdel_main() 110 sprintf(toybuf, "/var/spool/mail/%s",pwd->pw_name); in userdel_main()
|
/third_party/node/test/parallel/ |
D | test-path-zero-length-strings.js | 11 const pwd = process.cwd(); constant 19 assert.strictEqual(path.join(pwd), pwd); 20 assert.strictEqual(path.join(pwd, ''), pwd); 25 assert.strictEqual(path.normalize(pwd), pwd); 33 assert.strictEqual(path.resolve(''), pwd); 34 assert.strictEqual(path.resolve('', ''), pwd); 37 assert.strictEqual(path.relative('', pwd), ''); 38 assert.strictEqual(path.relative(pwd, ''), ''); 39 assert.strictEqual(path.relative(pwd, pwd), '');
|
D | test-os.js | 210 const pwd = os.userInfo(); constant 211 is.object(pwd); 215 assert.strictEqual(pwd.uid, -1); 216 assert.strictEqual(pwd.gid, -1); 217 assert.strictEqual(pwd.shell, null); 222 is.number(pwd.uid); 223 is.number(pwd.gid); 224 assert.strictEqual(typeof pwd.shell, 'string'); 226 if (pwd.shell.length > 0) { 227 assert(pwd.shell.includes(path.sep)); [all …]
|
/third_party/toybox/toys/other/ |
D | login.c | 43 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 …]
|
/third_party/python/Lib/test/ |
D | test_pwd.py | 5 pwd = import_helper.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 …]
|
/third_party/curl/tests/ |
D | testcurl.pl | 69 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 …]
|
/third_party/mbedtls/library/ |
D | pem.c | 78 const unsigned char *pwd, size_t pwdlen ) in pem_pbkdf1() argument 92 if( ( ret = mbedtls_md5_update( &md5_ctx, pwd, pwdlen ) ) != 0 ) in pem_pbkdf1() 114 if( ( ret = mbedtls_md5_update( &md5_ctx, pwd, pwdlen ) ) != 0 ) in pem_pbkdf1() 140 const unsigned char *pwd, size_t pwdlen ) in pem_des_decrypt() argument 148 if( ( ret = pem_pbkdf1( des_key, 8, des_iv, pwd, pwdlen ) ) != 0 ) in pem_des_decrypt() 168 const unsigned char *pwd, size_t pwdlen ) in pem_des3_decrypt() argument 176 if( ( ret = pem_pbkdf1( des3_key, 24, des3_iv, pwd, pwdlen ) ) != 0 ) in pem_des3_decrypt() 198 const unsigned char *pwd, size_t pwdlen ) in pem_aes_decrypt() argument 206 if( ( ret = pem_pbkdf1( aes_key, keylen, aes_iv, pwd, pwdlen ) ) != 0 ) in pem_aes_decrypt() 226 const unsigned char *data, const unsigned char *pwd, in mbedtls_pem_read_buffer() argument [all …]
|
D | pkcs12.c | 81 const unsigned char *pwd, size_t pwdlen, in pkcs12_pbe_derive_key_iv() argument 101 unipwd[i * 2 + 1] = pwd[i]; in pkcs12_pbe_derive_key_iv() 126 const unsigned char *pwd, size_t pwdlen, in mbedtls_pkcs12_pbe() argument 137 if( pwd == NULL && pwdlen != 0 ) in mbedtls_pkcs12_pbe() 146 if( ( ret = pkcs12_pbe_derive_key_iv( pbe_params, md_type, pwd, pwdlen, in mbedtls_pkcs12_pbe() 213 const unsigned char *pwd, size_t pwdlen, in mbedtls_pkcs12_derivation() argument 237 if( pwd == NULL && pwdlen != 0 ) in mbedtls_pkcs12_derivation() 243 use_password = ( pwd && pwdlen != 0 ); in mbedtls_pkcs12_derivation() 270 pkcs12_fill_buffer( pwd_block, v, pwd, pwdlen ); in mbedtls_pkcs12_derivation()
|
/third_party/libuv/test/ |
D | test-get-passwd.c | 36 uv_passwd_t pwd; in TEST_IMPL() local 41 r = uv_os_get_passwd(&pwd); in TEST_IMPL() 43 len = strlen(pwd.username); in TEST_IMPL() 47 ASSERT_NULL(pwd.shell); in TEST_IMPL() 49 len = strlen(pwd.shell); in TEST_IMPL()
|
D | test-platform-output.c | 42 uv_passwd_t pwd; in TEST_IMPL() local 154 err = uv_os_get_passwd(&pwd); in TEST_IMPL() 158 printf(" euid: %ld\n", pwd.uid); in TEST_IMPL() 159 printf(" gid: %ld\n", pwd.gid); in TEST_IMPL() 160 printf(" username: %s\n", pwd.username); in TEST_IMPL() 161 printf(" shell: %s\n", pwd.shell); in TEST_IMPL() 162 printf(" home directory: %s\n", pwd.homedir); in TEST_IMPL() 163 uv_os_free_passwd(&pwd); in TEST_IMPL()
|
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/clock_getcpuclockid/ |
D | 5-1.c | 34 struct passwd *pwd; in main() 36 pwd = getpwnam("nobody"); in main() 37 if (pwd != NULL) { in main() 38 if (setgid(pwd->pw_gid)) { in main() 42 if (setuid(pwd->pw_uid)) { in main()
|
/third_party/iptables/extensions/ |
D | libxt_owner.c | 143 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 …]
|
/third_party/toybox/toys/posix/ |
D | pwd.c | 26 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()
|
/third_party/boost/libs/log/src/posix/ |
D | object_name.cpp | 107 passwd pwd = {}, *result = NULL; 111 … const int err = getpwuid_r(uid, &pwd, &string_storage[0], string_storage.size(), &result); 124 std::memset(&pwd, 0, sizeof(pwd)); 129 std::memset(&pwd, 0, sizeof(pwd));
|
/third_party/mindspore/ |
D | setup.py | 32 pwd = os.path.dirname(os.path.realpath(__file__)) variable 37 with open(os.path.join(pwd, filename), encoding='UTF-8') as f: 71 version_file = os.path.join(pwd, 'mindspore', 'version.py') 79 config_file = os.path.join(pwd, 'mindspore', 'default_config.py') 87 target = os.path.join(pwd, 'mindspore', 'default_config.py') 95 package_info = os.path.join(pwd, 'mindspore', 'default_config.py') 103 commit_file = os.path.join(pwd, 'mindspore', '.commit_id')
|
/third_party/selinux/libselinux/utils/ |
D | togglesebool.c | 81 struct passwd *pwd = getpwuid(getuid()); in main() local 83 if (pwd && pwd->pw_name) in main() 86 argv[i], pwd->pw_name); in main()
|
/third_party/glib/glib/tests/ |
D | unix.c | 302 struct passwd *pwd; in test_get_passwd_entry_root() local 308 pwd = g_unix_get_passwd_entry ("root", &local_error); in test_get_passwd_entry_root() 311 g_assert_cmpstr (pwd->pw_name, ==, "root"); in test_get_passwd_entry_root() 312 g_assert_cmpuint (pwd->pw_uid, ==, 0); in test_get_passwd_entry_root() 314 g_free (pwd); in test_get_passwd_entry_root() 320 struct passwd *pwd; in test_get_passwd_entry_nonexistent() local 326 pwd = g_unix_get_passwd_entry ("thisusernamedoesntexist", &local_error); in test_get_passwd_entry_nonexistent() 328 g_assert_null (pwd); in test_get_passwd_entry_nonexistent()
|
/third_party/libuv/src/unix/ |
D | core.c | 1070 uv_passwd_t pwd; in uv_os_homedir() local 1083 r = uv__getpwuid_r(&pwd); in uv_os_homedir() 1089 len = strlen(pwd.homedir); in uv_os_homedir() 1093 uv_os_free_passwd(&pwd); in uv_os_homedir() 1097 memcpy(buffer, pwd.homedir, len + 1); in uv_os_homedir() 1099 uv_os_free_passwd(&pwd); in uv_os_homedir() 1156 int uv__getpwuid_r(uv_passwd_t* pwd) { in uv__getpwuid_r() argument 1168 if (pwd == NULL) in uv__getpwuid_r() 1212 pwd->username = uv__malloc(name_size + homedir_size + shell_size); in uv__getpwuid_r() 1214 if (pwd->username == NULL) { in uv__getpwuid_r() [all …]
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_pem.data | 20 mbedtls_pem_read_buffer:"^":"$":"^\nProc-Type\: 4,ENCRYPTED\nDEK-Info\: DES-EDE3-CBC,00$":"pwd":MBE… 23 mbedtls_pem_read_buffer:"^":"$":"^\nProc-Type\: 4,ENCRYPTED\nDEK-Info\: DES-CBC,00$":"pwd":MBEDTLS_… 26 mbedtls_pem_read_buffer:"^":"$":"^\nProc-Type\: 4,ENCRYPTED\nDEK-Info\: AES-,00$":"pwd":MBEDTLS_ERR… 30 …EK-Info\: DES-CBC,AA94892A169FA426\n\nMAAA\n-----END EC PRIVATE KEY-----":"pwd":MBEDTLS_ERR_DES_IN… 34 …fo\: DES-EDE3-CBC,AA94892A169FA426\n\nMAAA\n-----END EC PRIVATE KEY-----":"pwd":MBEDTLS_ERR_DES_IN… 38 …C,AA94892A169FA426AA94892A169FA426\n\nMAAA\n-----END EC PRIVATE KEY-----":"pwd":MBEDTLS_ERR_AES_IN…
|
/third_party/ltp/testcases/kernel/syscalls/execve/ |
D | execve02.c | 69 struct passwd *pwd; in setup() local 73 pwd = SAFE_GETPWNAM(USER_NAME); in setup() 74 nobody_uid = pwd->pw_uid; in setup()
|
/third_party/musl/libc-test/src/functionalext/supplement/passwd/ |
D | getgrouplist.c | 36 struct passwd *pwd = getpwnam(server_user); in getgrouplist_0100() local 37 if (!pwd) { in getgrouplist_0100() 41 gid_t server_gid = pwd->pw_gid; in getgrouplist_0100()
|
/third_party/boost/libs/regex/example/snippets/ |
D | mfc_example.cpp | 120 CString pwd = "abcDEF---"; in main() local 122 bool b = is_valid_password(pwd, pwd_check); in main() 124 pwd = "abcD-"; in main() 125 b = is_valid_password(pwd, pwd_check); in main()
|