diff options
| author | Nick Sayer <nsayer@FreeBSD.org> | 2000-05-13 15:58:36 +0000 |
|---|---|---|
| committer | Nick Sayer <nsayer@FreeBSD.org> | 2000-05-13 15:58:36 +0000 |
| commit | 0d9fb499eb477c0430aabc241fb7b367d55173ab (patch) | |
| tree | 4a140a808e4e1195f9443b232847647f102d01a4 /libexec/rexecd/rexecd.c | |
| parent | 8bbd2c1e465af3dccc4be2df787c2845f2560ddc (diff) | |
Notes
Diffstat (limited to 'libexec/rexecd/rexecd.c')
| -rw-r--r-- | libexec/rexecd/rexecd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libexec/rexecd/rexecd.c b/libexec/rexecd/rexecd.c index 10c2f2be98c6..bd8876cbaadd 100644 --- a/libexec/rexecd/rexecd.c +++ b/libexec/rexecd/rexecd.c @@ -82,6 +82,8 @@ void getstr __P((char *, int, char *)); /*VARARGS1*/ void error __P(()); +int no_uid_0 = 1; + /* * remote execute server: * username\0 @@ -99,6 +101,9 @@ main(argc, argv) int fromlen; struct hostent *hp; + if (argc == 2 && !strcmp(argv[1], "-i")) + no_uid_0 = 0; + openlog(argv[0], LOG_PID, LOG_AUTH); fromlen = sizeof (from); if (getpeername(0, (struct sockaddr *)&from, &fromlen) < 0) @@ -191,7 +196,7 @@ doit(f, fromp) } } - if (pwd->pw_uid == 0 || *pwd->pw_passwd == '\0' || + if ((pwd->pw_uid == 0 && no_uid_0) || *pwd->pw_passwd == '\0' || (pwd->pw_expire && time(NULL) >= pwd->pw_expire)) { syslog(LOG_ERR, "%s LOGIN REFUSED from %s", user, remote); error("Login incorrect.\n"); |
