Lines Matching +full:user +full:- +full:defined

38 #if defined(_CRAY) || (defined(__hpux) && !defined(HAVE_UTMPX_H))
52 #elif defined(HAVE_UTMP_H)
75 #if !defined(WTMP_FILE) && defined(_PATH_WTMP)
98 #if !(defined(__sgi) || defined(__linux) || defined(_AIX)) && defined(HAVE_SYS_TTY)
150 # define cfsetospeed(tp, val) (tp)->c_cflag &= ~CBAUD; \
151 (tp)->c_cflag |= (val)
152 # define cfgetospeed(tp) ((tp)->c_cflag & CBAUD)
154 # define cfsetispeed(tp, val) (tp)->c_cflag &= ~CIBAUD; \
155 (tp)->c_cflag |= ((val)<<IBSHIFT)
156 # define cfgetispeed(tp) (((tp)->c_cflag & CIBAUD)>>IBSHIFT)
158 # define cfsetispeed(tp, val) (tp)->c_cflag &= ~CBAUD; \
159 (tp)->c_cflag |= (val)
160 # define cfgetispeed(tp) ((tp)->c_cflag & CBAUD)
165 static int ttyfd = -1;
276 #if !defined(VDISCARD) && defined(VFLUSHO) in spcset()
329 if ((numptys = sysconf(_SC_CRAY_NPTY)) != -1) in getnpty()
346 static int ptyslavefd = -1;
355 #if !defined(HAVE_PTSNAME) && defined(STREAMSPTY)
368 #if defined(HAVE_OPENPTY) || defined(__linux) || defined(__osf__) /* XXX */ in getpty()
384 return -1; in getpty()
512 return(-1); in getpty()
628 # if !defined(ECHOCTL) && !defined(TCTLECH) in tty_islitecho()
702 { -1, 0 }
712 for (tp = termspeeds; (tp->speed != -1) && (val > tp->speed); tp++) in tty_tspeed()
714 if (tp->speed == -1) /* back up to last valid value */ in tty_tspeed()
715 --tp; in tty_tspeed()
716 cfsetospeed(&termbuf, tp->value); in tty_tspeed()
728 for (tp = termspeeds; (tp->speed != -1) && (val > tp->speed); tp++) in tty_rspeed()
730 if (tp->speed == -1) /* back up to last valid value */ in tty_rspeed()
731 --tp; in tty_rspeed()
732 cfsetispeed(&termbuf, tp->value); in tty_rspeed()
753 #if defined(I_FIND) && defined(I_LIST) in my_find()
763 return -1; in my_find()
770 return -1; in my_find()
798 for(p--; p >= modules; p--){ in maybe_push_modules()
815 int t = -1; in getptyslave()
824 * so that we can re-set them if we need to. in getptyslave()
907 # if defined(_CRAY) || defined(__hpux) in getptyslave()
919 # if !(defined(_CRAY) || defined(__hpux)) && (BSD <= 43) in getptyslave()
935 if (login_tty(t) == -1) in getptyslave()
941 ourpty = -1; in getptyslave()
957 if (ptyslavefd != -1) in cleanopen()
979 return(-1); in cleanopen()
985 # if !(defined(_CRAY) || defined(__hpux)) && (BSD <= 43) && !defined(STREAMSPTY) in cleanopen()
994 return(-1); in cleanopen()
996 # if defined(_CRAY) && defined(TCVHUP) in cleanopen()
1006 return(-1); in cleanopen()
1010 # endif /* defined(CRAY) && defined(TCVHUP) */ in cleanopen()
1014 #if !defined(BSD4_4)
1020 # if defined(TIOCSCTTY) && !defined(__hpux) in login_tty()
1025 * Close the hard fd to /dev/ttypXXX, and re-open through in login_tty()
1034 * We get our controlling tty assigned as a side-effect in login_tty()
1179 #if defined(DCE) in startslave()
1200 *envp++ -= 3; in init_env()
1201 #if defined(_CRAY) || defined(__hpux) in init_env()
1278 char *user; in start_login() local
1320 * -h : pass on name of host. in start_login()
1321 * WARNING: -h is accepted by login if and only if in start_login()
1323 * -p : don't clobber the environment (so terminal type stays set). in start_login()
1325 * -f : force this login, he has already been authenticated in start_login()
1333 addarg(&argv, "-h"); in start_login()
1335 addarg(&argv, "-p"); in start_login()
1337 user = name; in start_login()
1339 user = getenv("USER"); in start_login()
1343 printf("User not authenticated. "); in start_login()
1345 printf("Using one-time password\r\n"); in start_login()
1350 addarg(&argv, "-a"); in start_login()
1355 host, user ? user : "unknown user"); in start_login()
1358 addarg(&argv, "-f"); in start_login()
1360 if(user){ in start_login()
1361 addarg(&argv, "--"); in start_login()
1362 addarg(&argv, strdup(user)); in start_login()
1364 if (getenv("USER")) { in start_login()
1366 * Assume that login will set the USER variable in start_login()
1368 * USER will no longer be set, just LOGNAME by in start_login()
1369 * login. (The problem is that if the auto-login in start_login()
1370 * fails, and the user then specifies a different in start_login()
1372 * LOGNAME and USER in his environment, but the in start_login()
1373 * USER value will be wrong. in start_login()
1375 unsetenv("USER"); in start_login()
1395 if(argv->size <= argv->argc+1) { in addarg()
1396 argv->argv = realloc(argv->argv, sizeof(char*) * (argv->size + 10)); in addarg()
1397 if (argv->argv == NULL) in addarg()
1399 argv->size+=10; in addarg()
1401 if((argv->argv[argv->argc++] = strdup(val)) == NULL) in addarg()
1403 argv->argv[argv->argc] = NULL; in addarg()
1437 user0 = utxp->ut_user[0]; in rmut()
1438 utxp->ut_user[0] = '\0'; in rmut()
1439 utxp->ut_type = DEAD_PROCESS; in rmut()
1442 utxp->ut_exit.__e_termination = 0; in rmut()
1443 utxp->ut_exit.__e_exit = 0; in rmut()
1444 #elif defined(__osf__) /* XXX */ in rmut()
1445 utxp->ut_exit.ut_termination = 0; in rmut()
1446 utxp->ut_exit.ut_exit = 0; in rmut()
1448 utxp->ut_exit.e_termination = 0; in rmut()
1449 utxp->ut_exit.e_exit = 0; in rmut()
1453 utxp->ut_tv.tv_sec = tv.tv_sec; in rmut()
1454 utxp->ut_tv.tv_usec = tv.tv_usec; in rmut()
1458 utxp->ut_user[0] = user0; in rmut()
1460 #elif defined(WTMP_FILE) in rmut()
1483 #if !defined(HAVE_UTMPX_H) && !(defined(_CRAY) || defined(__hpux)) && BSD <= 43
1505 if (strncmp(u->ut_line, in rmut()
1507 sizeof(u->ut_line)) || in rmut()
1508 u->ut_name[0]==0) in rmut()
1510 lseek(f, ((long)u)-((long)utmp), L_SET); in rmut()
1511 strncpy(u->ut_name, "", sizeof(u->ut_name)); in rmut()
1513 strncpy(u->ut_host, "", sizeof(u->ut_host)); in rmut()
1515 u->ut_time = time(NULL); in rmut()
1543 #if defined(__hpux) && !defined(HAVE_UTMPX_H)
1557 utptr->ut_type = DEAD_PROCESS; in rmut()
1558 utptr->ut_time = time(NULL); in rmut()
1610 while (waitpid(-1, &child_status, flags) > 0) in cleanup()
1646 #if defined(HAVE_UTMPX_H) || !defined(HAVE_LOGWTMP) in cleanup()
1656 p = line + sizeof("/dev/") - 1; in cleanup()
1677 * the utmp file between the server and the soon-to-be-login shell.
1680 * signals the future-login shell to proceed.
1699 if ((int)(func = signal(SIGUSR1, _utmp_sig_rcv)) == -1) in utmp_sig_init()
1745 while ((jid = waitjob(NULL)) != -1) {
1768 if ( (cur->ut_type != NULL) && (jid == cur->ut_jid) ) {
1808 return(-1);
1811 * Nothing to clean up if the user shell was never started.
1813 if (utp->ut_type != USER_PROCESS || utp->ut_jid == 0)
1820 ret = jobend(utp->ut_jid, utp->ut_tpath, utp->ut_user);
1826 jobend(jid, path, user) in jobend() argument
1829 char *user;
1855 strlcpy(saved_user, user, sizeof(saved_user));
1872 return(-1);
1875 cleantmpdir(jid, utp->ut_tpath, utp->ut_user);
1886 cleantmpdir(jid, tpath, user) in cleantmpdir() argument
1889 char *user;
1892 case -1:
1897 execl(CLEANTMPCMD, CLEANTMPCMD, user, tpath, NULL);
1910 #endif /* defined(PARENT_DOES_UTMP) */