Create group ftp by default. This is gid 14 as this is the historical
id used by sysinstall when enabling anonymous FTP. Change the default group used by sysinstall for setting up anonymous FTP from operator to ftp; there is no reason to use operator and there are potential security issues when doing so. PR: 93284 Approved by: ru (mentor) Reviewed by: simon
This commit is contained in:
parent
56b8f0b02d
commit
3213dc8412
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170566
@ -11,6 +11,7 @@ bin:*:7:
|
|||||||
news:*:8:
|
news:*:8:
|
||||||
man:*:9:
|
man:*:9:
|
||||||
games:*:13:
|
games:*:13:
|
||||||
|
ftp:*:14:
|
||||||
staff:*:20:
|
staff:*:20:
|
||||||
sshd:*:22:
|
sshd:*:22:
|
||||||
smmsp:*:25:
|
smmsp:*:25:
|
||||||
|
@ -49,8 +49,8 @@
|
|||||||
/* These change if we want to use different defaults */
|
/* These change if we want to use different defaults */
|
||||||
|
|
||||||
#define FTP_UID 14
|
#define FTP_UID 14
|
||||||
#define FTP_GID 5
|
#define FTP_GID 14
|
||||||
#define FTP_GROUP "operator"
|
#define FTP_GROUP "ftp"
|
||||||
#define FTP_UPLOAD "incoming"
|
#define FTP_UPLOAD "incoming"
|
||||||
#define FTP_COMMENT "Anonymous FTP Admin"
|
#define FTP_COMMENT "Anonymous FTP Admin"
|
||||||
#define FTP_HOMEDIR "/var/ftp"
|
#define FTP_HOMEDIR "/var/ftp"
|
||||||
@ -148,7 +148,7 @@ createFtpUser(void)
|
|||||||
else if (!getgrgid(gid)) {
|
else if (!getgrgid(gid)) {
|
||||||
/* group does not exist, create it by number */
|
/* group does not exist, create it by number */
|
||||||
|
|
||||||
tptr = msgGetInput("14", "What group name to use for gid %d ?", gid);
|
tptr = msgGetInput("ftp", "What group name to use for gid %d ?", gid);
|
||||||
if (tptr && *tptr) {
|
if (tptr && *tptr) {
|
||||||
SAFE_STRCPY(tconf.group, tptr);
|
SAFE_STRCPY(tconf.group, tptr);
|
||||||
if ((tgrp = getgrnam(tconf.group))) {
|
if ((tgrp = getgrnam(tconf.group))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user