Hi

I started working on a patch for adduser utility i.e removing the fixme and 
restructuring the code and implementing options S and D as they are currently 
disabled.

i though it would make sense to send the first patch that is for addgroup, as 
in my opinion adduser depends on addgroup

and the configs are needed in both places , so they should be in addgroup.

let me know what you think.

Haroon
diff --git a/loginutils/addgroup.c b/loginutils/addgroup.c
index 6839eafbd..ffa1309c1 100644
--- a/loginutils/addgroup.c
+++ b/loginutils/addgroup.c
@@ -23,6 +23,41 @@
 //config:	If called with two non-option arguments,
 //config:	addgroup will add an existing user to an
 //config:	existing group.
+//config:
+//config:config FEATURE_CHECK_NAMES
+//config:	bool "Enable sanity check on user/group names in adduser and addgroup"
+//config:	default n
+//config:	depends on   ADDGROUP
+//config:	help
+//config:	Enable sanity check on user and group names in adduser and addgroup.
+//config:	To avoid problems, the user or group name should consist only of
+//config:	letters, digits, underscores, periods, at signs and dashes,
+//config:	and not start with a dash (as defined by IEEE Std 1003.1-2001).
+//config:	For compatibility with Samba machine accounts "$" is also supported
+//config:	at the end of the user or group name.
+//config:
+//config:config LAST_ID
+//config:	int "Last valid uid or gid for adduser and addgroup"
+//config:	depends on ADDGROUP
+//config:	default 60000
+//config:	help
+//config:	Last valid uid or gid for adduser and addgroup
+//config:
+//config:config FIRST_SYSTEM_ID
+//config:	int "First valid system uid or gid for adduser and addgroup"
+//config:	depends on ADDGROUP
+//config:	range 0 LAST_ID
+//config:	default 100
+//config:	help
+//config:	First valid system uid or gid for adduser and addgroup
+//config:
+//config:config LAST_SYSTEM_ID
+//config:	int "Last valid system uid or gid for adduser and addgroup"
+//config:	depends on  ADDGROUP
+//config:	range FIRST_SYSTEM_ID LAST_ID
+//config:	default 999
+//config:	help
+//config:	Last valid system uid or gid for adduser and addgroup
 
 //applet:IF_ADDGROUP(APPLET_NOEXEC(addgroup, addgroup, BB_DIR_USR_SBIN, BB_SUID_DROP, addgroup))
 
diff --git a/loginutils/adduser.c b/loginutils/adduser.c
index b2b5be5b3..dd9c0b6db 100644
--- a/loginutils/adduser.c
+++ b/loginutils/adduser.c
@@ -9,45 +9,12 @@
  */
 //config:config ADDUSER
 //config:	bool "adduser (15 kb)"
+//config:	depends on ADDGROUP
 //config:	default y
 //config:	select LONG_OPTS
 //config:	help
 //config:	Utility for creating a new user account.
-//config:
-//config:config FEATURE_CHECK_NAMES
-//config:	bool "Enable sanity check on user/group names in adduser and addgroup"
-//config:	default n
-//config:	depends on ADDUSER || ADDGROUP
-//config:	help
-//config:	Enable sanity check on user and group names in adduser and addgroup.
-//config:	To avoid problems, the user or group name should consist only of
-//config:	letters, digits, underscores, periods, at signs and dashes,
-//config:	and not start with a dash (as defined by IEEE Std 1003.1-2001).
-//config:	For compatibility with Samba machine accounts "$" is also supported
-//config:	at the end of the user or group name.
-//config:
-//config:config LAST_ID
-//config:	int "Last valid uid or gid for adduser and addgroup"
-//config:	depends on ADDUSER || ADDGROUP
-//config:	default 60000
-//config:	help
-//config:	Last valid uid or gid for adduser and addgroup
-//config:
-//config:config FIRST_SYSTEM_ID
-//config:	int "First valid system uid or gid for adduser and addgroup"
-//config:	depends on ADDUSER || ADDGROUP
-//config:	range 0 LAST_ID
-//config:	default 100
-//config:	help
-//config:	First valid system uid or gid for adduser and addgroup
-//config:
-//config:config LAST_SYSTEM_ID
-//config:	int "Last valid system uid or gid for adduser and addgroup"
-//config:	depends on ADDUSER || ADDGROUP
-//config:	range FIRST_SYSTEM_ID LAST_ID
-//config:	default 999
-//config:	help
-//config:	Last valid system uid or gid for adduser and addgroup
+
 
 //applet:IF_ADDUSER(APPLET_NOEXEC(adduser, adduser, BB_DIR_USR_SBIN, BB_SUID_DROP, adduser))
 
@@ -69,13 +36,6 @@
 
 #include "libbb.h"
 
-#if CONFIG_LAST_SYSTEM_ID < CONFIG_FIRST_SYSTEM_ID
-#error Bad LAST_SYSTEM_ID or FIRST_SYSTEM_ID in .config
-#endif
-#if CONFIG_LAST_ID < CONFIG_LAST_SYSTEM_ID
-#error Bad LAST_ID or LAST_SYSTEM_ID in .config
-#endif
-
 
 /* #define OPT_HOME           (1 << 0) */ /* unused */
 /* #define OPT_GECOS          (1 << 1) */ /* unused */
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to