FreeBSD Bugzilla – Attachment 10632 Details for
Bug 21268
[MFC] user set no nobody is not good
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.59 KB, created by
babolo
on 2000-09-14 17:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
babolo
Created:
2000-09-14 17:50:01 UTC
Size:
1.59 KB
patch
obsolete
>--- libexec/tftpd/tftpd.c Sat Aug 28 04:10:26 1999 >+++ libexec/tftpd/tftpd.c Tue Sep 12 21:34:52 2000 >@@ -121,9 +121,10 @@ > struct sockaddr_in sin; > char *chroot_dir = NULL; > struct passwd *nobody; >+ char *chuser = "nobody"; > > openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP); >- while ((ch = getopt(argc, argv, "lns:")) != -1) { >+ while ((ch = getopt(argc, argv, "lns:u:")) != -1) { > switch (ch) { > case 'l': > logging = 1; >@@ -134,6 +135,9 @@ > case 's': > chroot_dir = optarg; > break; >+ case 'u': >+ chuser = optarg; >+ break; > default: > syslog(LOG_WARNING, "ignoring unknown option -%c", ch); > } >@@ -226,8 +230,8 @@ > */ > if (chroot_dir) { > /* Must get this before chroot because /etc might go away */ >- if ((nobody = getpwnam("nobody")) == NULL) { >- syslog(LOG_ERR, "nobody: no such user"); >+ if ((nobody = getpwnam(chuser)) == NULL) { >+ syslog(LOG_ERR, "%s: no such user", chuser); > exit(1); > } > if (chroot(chroot_dir)) { >--- tftpd.8 Sun Aug 29 03:08:19 1999 >+++ tftpd.8 Thu Sep 14 19:54:52 2000 >@@ -44,6 +44,7 @@ > .Op Fl l > .Op Fl n > .Op Fl s Ar directory >+.Op Fl u Ar user > .Op Ar directory ... > .Sh DESCRIPTION > .Nm Tftpd >@@ -100,7 +101,9 @@ > .Nm > as root. However, if you chroot, then > .Nm >-will set its user id to nobody. >+will set its user id to nobody or >+.Fl u >+argument. > .Pp > The options are: > .Bl -tag -width Ds >@@ -119,7 +122,12 @@ > to chroot to > .Pa directory > before accepting commands. In addition, the user id is set to >-nobody. >+nobody or argument of >+.Fl u . >+.It Fl u Ar user >+User name instead of nobody if >+.Fl s >+used. > .Pp > If you are not running > .Fl s ,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 21268
: 10632