Home | History | Annotate | Download | only in sandbox

Lines Matching refs:pwd

15 #include <pwd.h>
382 struct passwd *pwd, int copy_content)
394 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) {
408 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) rc++;
419 if ((uid_t)setfsuid(pwd->pw_uid) != 0) {
434 struct stat *out_st, struct passwd *pwd, security_context_t execcon)
444 if ((uid_t)setfsuid(pwd->pw_uid) != 0)
465 if ((uid_t)setfsuid(0) != pwd->pw_uid)
469 if (asprintf(&tmpdir, "/tmp/.sandbox-%s-XXXXXX", pwd->pw_name) == -1) {
521 if ((uid_t)setfsuid(pwd->pw_uid) != 0)
529 if ((uid_t)setfsuid(0) != pwd->pw_uid)
532 if (cmdbuf && spawn_command(cmdbuf, pwd->pw_uid) != 0) {
534 cleanup_tmpdir(tmpdir, src, pwd, 0);
656 struct passwd *pwd=getpwuid(uid);
657 if (!pwd) {
662 if (verify_shell(pwd->pw_shell) < 0) {
736 &st_tmpdir_r, pwd, execcon)) == NULL) {
770 resolved_path = realpath(pwd->pw_dir,NULL);
819 rc |= setenv("HOME", pwd->pw_dir, 1);
820 rc |= setenv("SHELL", pwd->pw_shell, 1);
821 rc |= setenv("USER", pwd->pw_name, 1);
822 rc |= setenv("LOGNAME", pwd->pw_name, 1);
829 if (chdir(pwd->pw_dir)) {
870 if (tmpdir_r) cleanup_tmpdir(tmpdir_r, tmpdir_s, pwd, 1);