a few corrections
This commit is contained in:
+11
-8
@@ -1,10 +1,10 @@
|
||||
--- loginutils/adduser.c.orig
|
||||
+++ loginutils/adduser.c
|
||||
@@ -44,6 +44,7 @@
|
||||
//usage: "\n -H Don't create home directory"
|
||||
//usage: "\n -u UID User id"
|
||||
//usage: "\n -k SKEL Skeleton directory (/etc/skel)"
|
||||
+//usage: "\n -b DOB Date of birth (YYYYMMDD)"
|
||||
//usage: "\n\t-H\t\tDon't create home directory"
|
||||
//usage: "\n\t-u UID\t\tUser id"
|
||||
//usage: "\n\t-k SKEL\t\tSkeleton directory (/etc/skel)"
|
||||
+//usage: "\n\t-b DOB\t\tDate of birth (YYYYMMDD)"
|
||||
|
||||
#include "libbb.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
/* got root? */
|
||||
if (geteuid()) {
|
||||
@@ -151,12 +155,12 @@
|
||||
@@ -151,7 +155,7 @@
|
||||
pw.pw_dir = NULL;
|
||||
|
||||
opts = getopt32long(argv, "^"
|
||||
@@ -41,13 +41,15 @@
|
||||
/* at least one and at most two non-option args */
|
||||
/* disable interactive passwd for system accounts */
|
||||
"\0" "-1:?2:SD",
|
||||
@@ -158,7 +162,7 @@
|
||||
adduser_longopts,
|
||||
&pw.pw_dir, &pw.pw_gecos, &pw.pw_shell,
|
||||
&usegroup, &uid, &skel
|
||||
- &pw.pw_dir, &pw.pw_gecos, &pw.pw_shell,
|
||||
- &usegroup, &uid, &skel
|
||||
+ &pw.pw_dir, &pw.pw_gecos, &pw.pw_shell,
|
||||
+ &usegroup, &uid, &skel, &dob
|
||||
);
|
||||
if (opts & OPT_UID)
|
||||
pw.pw_uid = atoi(uid);
|
||||
@@ -200,6 +204,16 @@
|
||||
free(p);
|
||||
#endif
|
||||
@@ -62,6 +64,7 @@
|
||||
+ bb_perror_msg("/etc/birthdays");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
/* add to group */
|
||||
addgroup_wrapper(&pw, usegroup);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user