Lines Matching refs:thisuser

175 static struct passwd thisuser;
245 memcpy(&thisuser, &nouser, sizeof(thisuser));
250 thisuser.pw_uid = pwd->pw_uid;
251 thisuser.pw_gid = pwd->pw_gid;
253 if (!(thisuser.pw_name = malloc(strlen(pwd->pw_name) + 1)))
255 strcpy(thisuser.pw_name, pwd->pw_name);
257 if (!(thisuser.pw_dir = malloc(strlen(pwd->pw_dir) + 1)))
259 strcpy(thisuser.pw_dir, pwd->pw_dir);
261 if (!(thisuser.pw_shell = malloc(strlen(pwd->pw_shell) + 1)))
263 strcpy(thisuser.pw_shell, pwd->pw_shell);
274 if (!(thisuser.pw_passwd = malloc(strlen(pwd->pw_passwd) + 1)))
276 strcpy(thisuser.pw_passwd, pwd->pw_passwd);
280 return ((thisuser.pw_passwd[0] == '*') || (thisuser.pw_passwd[0] == '#'));
283 memcpy(&thisuser, &nouser, sizeof(thisuser));
456 memcpy(&thisuser, &nouser, sizeof(thisuser));
464 rc = ruserok(host, !thisuser.pw_uid, rusername, name);
468 host, thisuser.pw_uid, rusername, name);
1081 if (uid != 0 && uid != thisuser.pw_uid)
1084 if (thisuser.pw_uid == 0)
1092 if (!fflag && (rflag < 1) && *thisuser.pw_passwd) {
1108 if (!memcmp(&thisuser, &nouser, sizeof(thisuser)))
1116 if (af_pwok && opiealways(thisuser.pw_dir))
1179 pp = crypt(buf, thisuser.pw_passwd);
1180 invalid = strcmp(pp, thisuser.pw_passwd);
1188 if (thisuser.pw_uid) {
1199 if (!invalid && !thisuser.pw_uid && !rootterm(tty)) {
1220 if (*thisuser.pw_shell == '\0')
1221 thisuser.pw_shell = "/bin/sh";
1235 if (quota(Q_SETUID, thisuser.pw_uid, 0, 0) < 0 && errno != EINVAL) {
1261 lseek(f, (long)thisuser.pw_uid * sizeof(struct lastlog), 0);
1272 lseek(f, (long)thisuser.pw_uid * sizeof(struct lastlog), 0);
1286 chown(tty, thisuser.pw_uid, TTYGID(thisuser.pw_gid));
1299 setgid(thisuser.pw_gid);
1300 initgroups(name, thisuser.pw_gid);
1303 quota(Q_DOWARN, thisuser.pw_uid, (dev_t) - 1, 0);
1307 home = thisuser.pw_dir;
1308 permsfile(name, tty, thisuser.pw_uid, thisuser.pw_gid);
1312 setuid(thisuser.pw_uid);
1317 setenv("HOME", thisuser.pw_dir, 1);
1318 setenv("SHELL", thisuser.pw_shell, 1);
1320 if (chdir(thisuser.pw_dir) < 0) {
1322 syslog(LOG_DEBUG, "chdir(%s): %s(%d)", thisuser.pw_dir, strerror(errno),
1330 strcpy(thisuser.pw_dir, "/");
1397 if ((namep = strrchr(thisuser.pw_shell, '/')) == NULL)
1398 namep = thisuser.pw_shell;
1404 if (!thisuser.pw_uid)
1454 execlp(thisuser.pw_shell, minusnam, 0);
1455 perror(thisuser.pw_shell);