diff options
| author | Nick Sayer <nsayer@FreeBSD.org> | 2000-06-30 16:46:58 +0000 |
|---|---|---|
| committer | Nick Sayer <nsayer@FreeBSD.org> | 2000-06-30 16:46:58 +0000 |
| commit | 35c176ff831a34328b50d418b0af3ba0a918b1e2 (patch) | |
| tree | ea0790377fc4c6a7a69f103f366e0f3c7a5ab28b /libexec | |
| parent | 46ff7cb0dc47a831919a933a46abd2d866279982 (diff) | |
Notes
Diffstat (limited to 'libexec')
| -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"); |
