Lines Matching refs:pwd
90 struct passwd pwd; /* The password entry of a user */ member
261 status = getpwuid_r(geteuid(), &home->pwd, home->buffer, home->buflen, in _hd_lookup_home_dir()
264 status = getpwnam_r(user, &home->pwd, home->buffer, home->buflen, &ret); in _hd_lookup_home_dir()
273 home_dir = home->pwd.pw_dir; in _hd_lookup_home_dir()
280 struct passwd *pwd = login_user ? getpwuid(geteuid()) : getpwnam(user); in _hd_lookup_home_dir() local
281 if(!pwd) { in _hd_lookup_home_dir()
289 home_dir = pwd->pw_dir; in _hd_lookup_home_dir()
363 struct passwd *pwd; /* A pointer to pwd_buffer */ local
370 &pwd) == 0 && pwd != NULL) {
371 waserr = callback_fn(data, pwd->pw_name, pwd->pw_dir,
378 &pwd) == 0 && pwd != NULL &&
379 strncmp(prefix, pwd->pw_name, prefix_len)==0) {
380 waserr = callback_fn(data, pwd->pw_name, pwd->pw_dir,
390 struct passwd *pwd; /* The pointer to the latest password entry */ local
401 while((pwd = getpwent_r(&pwd_buffer, home->buffer, home->buflen)) != NULL && !waserr) {
403 while((pwd = getpwent()) != NULL && !waserr) {
405 if(strncmp(prefix, pwd->pw_name, prefix_len) == 0) {
406 waserr = callback_fn(data, pwd->pw_name, pwd->pw_dir,
420 const char *pwd = hd_getpwd(home); local
421 if(pwd) {
422 waserr = callback_fn(data, "+", pwd, _err_get_msg(home->err),ERR_MSG_LEN);
459 const char *pwd = getenv("PWD"); local
467 if(pwd && cwd && stat(cwd, &cwdstat)==0 && stat(pwd, &pwdstat)==0 &&
469 return pwd;
475 return pwd;