7 ? tinylogin_1.4-20030620.1_arm.ipk
8 ? tinylogin_1.4-20030620.1_arm.ipk.asc
9 ? tinylogin_1.4-20030620.1_arm.ipk.upload.html
10 ? tinylogin_1.4-20030620.2_arm.ipk
11 ? tinylogin_1.4-20030620.2_arm.ipk.asc
12 ? tinylogin_1.4-20030620.2_arm.ipk.upload.html
13 ? tinylogin_1.4-20030620_arm.ipk
14 ? tinylogin_1.4-20030620_arm.ipk.asc
15 ? tinylogin_1.4-20030620_arm.ipk.upload.html
18 ===================================================================
19 RCS file: /var/cvs/tinylogin/addgroup.c,v
20 retrieving revision 1.23
21 diff -u -r1.23 addgroup.c
22 --- a/addgroup.c 9 Jan 2003 18:43:29 -0000 1.23
23 +++ b/addgroup.c 8 Jun 2004 08:56:08 -0000
26 #include <sys/types.h>
29 #include "tinylogin.h"
31 #define GROUP_FILE "/etc/group"
36 +static struct option long_options[] = {
37 + { "system", 0, NULL, 'S' },
42 * addgroup will take a login_name as its first parameter.
48 + int option_index = -1;
52 /* get remaining args */
53 - while ((opt = getopt (argc, argv, "g:")) != -1) {
54 + while ((opt = getopt_long (argc, argv, "g:S", long_options, &option_index)) != -1) {
57 gid = strtol(optarg, NULL, 10);
66 ===================================================================
67 RCS file: /var/cvs/tinylogin/adduser.c,v
68 retrieving revision 1.38
69 diff -u -r1.38 adduser.c
70 --- a/adduser.c 21 Jun 2003 19:35:42 -0000 1.38
71 +++ b/adduser.c 8 Jun 2004 08:56:09 -0000
75 /* EDR recoded such that the uid may be passed in *p */
76 -static int passwd_study(const char *filename, struct passwd *p)
77 +static int passwd_study(const char *filename, struct passwd *p, int system)
82 - const int min = 500;
83 - const int max = 65000;
84 + const int min = system ? 10 : 500;
85 + const int max = system ? 99 : 65000;
87 passwd = wfopen(filename, "r");
92 /* putpwent(3) remix */
93 -static int adduser(const char *filename, struct passwd *p, int makehome, int setpass)
94 +static int adduser(const char *filename, struct passwd *p, int makehome, int setpass, int system)
99 fseek(passwd, 0, SEEK_END);
101 /* if (passwd_study(filename, p) == 0) { */
102 - r = passwd_study(filename, p);
103 + r = passwd_study(filename, p, system);
106 error_msg("%s: login already in use", p->pw_name);
111 - return adduser(PASSWD_FILE, &pw, makehome, setpass);
112 + return adduser(PASSWD_FILE, &pw, makehome, setpass, system);
115 /* $Id: adduser.c,v 1.38 2003/06/21 19:35:42 andersen Exp $ */