]> git.pld-linux.org Git - packages/shadow.git/blame - shadow-pld.patch
- drop po translations, they all need to redone
[packages/shadow.git] / shadow-pld.patch
CommitLineData
83712a49
ER
1--- shadow-4.0.16/lib/getdef.c~ 2006-06-08 00:19:27.452506888 +0300
2+++ shadow-4.0.16/lib/getdef.c 2006-06-08 00:21:20.945057953 +0300
3@@ -59,6 +59,8 @@
4 {"FAKE_SHELL", NULL},
5 {"GID_MAX", NULL},
6 {"GID_MIN", NULL},
7+ {"SYS_GID_MAX", NULL},
8+ {"SYS_GID_MIN", NULL},
9 {"HUSHLOGIN_FILE", NULL},
10 {"KILLCHAR", NULL},
11 {"LOGIN_RETRIES", NULL},
12@@ -77,6 +79,8 @@
13 {"TTYTYPE_FILE", NULL},
14 {"UID_MAX", NULL},
15 {"UID_MIN", NULL},
16+ {"SYS_UID_MAX", NULL},
17+ {"SYS_UID_MIN", NULL},
18 {"UMASK", NULL},
19 {"USERDEL_CMD", NULL},
20 {"USERGROUPS_ENAB", NULL},
8f1ee8fc
ER
21--- shadow-4.0.6/src/useradd.c 2004-11-18 21:45:00.713398344 +0100
22+++ shadow-4.0.16/src/useradd.c 2006-06-08 01:17:05.580340031 +0300
23@@ -72,10 +72,10 @@
24 /*
25 * These defaults are used if there is no defaults file.
26 */
27-static gid_t def_group = 100;
28+static gid_t def_group = 1000;
29 static const char *def_gname = "other";
30-static const char *def_home = "/home";
31-static const char *def_shell = "";
32+static const char *def_home = "/home/users";
33+static const char *def_shell = "/dev/null";
34 static const char *def_template = SKEL_DIR;
35 static const char *def_create_mail_spool = "no";
36
37@@ -89,7 +89,7 @@
38 #define VALID(s) (strcspn (s, ":\n") == strlen (s))
39
40 static const char *user_name = "";
41-static const char *user_pass = "!";
42+static const char *user_pass = "!!";
43 static uid_t user_id;
44 static gid_t user_gid;
45 static const char *user_comment = "";
46@@ -126,6 +126,7 @@
47 mflg = 0, /* create user's home directory if it doesn't exist */
48 nflg = 0, /* create a group having the same name as the user */
49 oflg = 0, /* permit non-unique user ID to be specified with -u */
50+ rflg = 0, /* create system account (wuth lower uid) */
51 sflg = 0, /* shell program for new account */
52 uflg = 0; /* specify user ID for new account */
53
54@@ -632,6 +633,7 @@
55 " (non-unique) UID\n"
56 " -p, --password PASSWORD use encrypted password for the new user\n"
57 " account\n"
58+ " -r create a system account, with uid lower than usual\n"
59 " -s, --shell SHELL the login shell for the new user account\n"
60 " -u, --uid UID force use the UID for the new user account\n"));
61 exit (E_USAGE);
62@@ -833,6 +835,13 @@
63
64 uid_min = getdef_unum ("UID_MIN", 1000);
65 uid_max = getdef_unum ("UID_MAX", 60000);
66+ if (!rflg) {
67+ uid_min = getdef_unum ("UID_MIN", 500);
68+ uid_max = getdef_unum ("UID_MAX", 60000);
69+ } else {
70+ uid_min = getdef_unum ("SYS_UID_MIN", 1);
71+ uid_max = getdef_unum ("SYS_UID_MAX", 499);
72+ }
73
74 /*
75 * Start with some UID value if the user didn't provide us with
76@@ -1016,7 +1025,7 @@
77 {NULL, 0, NULL, '\0'}
78 };
79 while ((c =
80- getopt_long (argc, argv, "b:c:d:De:f:g:G:k:K:mMop:s:u:",
81+ getopt_long (argc, argv, "b:c:d:De:f:g:G:k:K:mMop:s:u:r",
82 long_options, NULL)) != -1) {
83 switch (c) {
84 case 'b':
85@@ -1169,6 +1178,9 @@
86 }
87 user_pass = optarg;
88 break;
89+ case 'r': /* create system account */
90+ rflg++;
91+ break;
92 case 's':
93 if (!VALID (optarg)
94 || (optarg[0]
2f820325
ER
95--- shadow-4.0.16/src/groupadd.c~ 2006-06-09 21:23:35.786172809 +0300
96+++ shadow-4.0.16/src/groupadd.c 2006-06-09 21:26:14.039716861 +0300
8f1ee8fc
ER
97@@ -72,6 +72,7 @@
98 static int oflg = 0; /* permit non-unique group ID to be specified with -g */
99 static int gflg = 0; /* ID value for the new group */
100 static int fflg = 0; /* if group already exists, do nothing and exit(0) */
101+static int rflg = 0; /* add system group (with lower gid) */
102
103 #ifdef NDBM
104 extern int gr_dbm_mode;
2f820325
ER
105@@ -104,6 +104,7 @@
106 " -h, --help display this help message and exit\n"
107 " -K, --key KEY=VALUE overrides /etc/login.defs defaults\n"
108 " -o, --non-unique allow create group with duplicate\n"
109+ " -r create a system account, with gid lower than usual\n"
110 " (non-unique) GID\n"));
8f1ee8fc
ER
111 exit (E_USAGE);
112 }
2f820325 113@@ -197,8 +198,13 @@
8f1ee8fc
ER
114 const struct group *grp;
115 gid_t gid_min, gid_max;
116
2f820325 117- gid_min = getdef_unum ("GID_MIN", 1000);
8f1ee8fc 118- gid_max = getdef_unum ("GID_MAX", 60000);
2f820325
ER
119+ if (!rflg) {
120+ gid_min = getdef_unum ("GID_MIN", 500);
121+ gid_max = getdef_unum ("GID_MAX", 60000);
122+ } else {
123+ gid_min = getdef_unum ("SYS_GID_MIN", 10);
124+ gid_max = getdef_unum ("SYS_GID_MAX", 499);
125+ }
126
8f1ee8fc
ER
127 /*
128 * Start with some GID value if the user didn't provide us with
2f820325
ER
129@@ -412,7 +418,7 @@
130 };
8f1ee8fc 131
2f820325
ER
132 while ((c =
133- getopt_long (argc, argv, "fg:hK:o", long_options,
134+ getopt_long (argc, argv, "fg:hK:or", long_options,
135 &option_index)) != -1) {
136 switch (c) {
137 case 'f':
138@@ -463,6 +469,10 @@
139 case 'o':
140 oflg++;
141 break;
142+ case 'r':
143+ /* create system group */
144+ rflg++;
145+ break;
146 default:
147 usage ();
8f1ee8fc 148 }
8f1ee8fc
ER
149--- shadow-4.0.16/man/groupadd.8.xml~ 2006-06-08 01:07:41.447664461 +0300
150+++ shadow-4.0.16/man/groupadd.8.xml 2006-06-08 01:07:45.947765703 +0300
151@@ -20,6 +20,7 @@
152 </arg>
153 <arg choice='opt'>-f </arg>
154 <arg choice='opt'>-K <replaceable>KEY</replaceable>=<replaceable>VALUE</replaceable></arg>
155+ <arg choice='opt'>-r </arg>
156 <arg choice='plain'>
157 <replaceable>group</replaceable>
158 </arg>
159@@ -54,6 +55,16 @@
160 </para>
161 </listitem>
162 </varlistentry>
163+ <varlistentry>
164+ <term>
165+ <option>-r</option>
166+ </term>
167+ <listitem>
168+ <para>This flag is used to create a system group, with gid lower than usual
169+ (chosen between SYS_GID_MIN and SYS_GID_MAX).
170+ </para>
171+ </listitem>
172+ </varlistentry>
173 <varlistentry>
174 <term>
175 <option>-g</option> <replaceable>GID</replaceable>
dbe8cb5a
ER
176--- shadow-4.0.16/man/pl/groupadd.8~ 2006-06-09 21:27:27.071352380 +0300
177+++ shadow-4.0.16/man/pl/groupadd.8 2006-06-09 21:29:35.034218035 +0300
178@@ -29,7 +29,7 @@
9a8f7050 179 .SH NAZWA
dbe8cb5a
ER
180 groupadd \- twórz nową grupę
181 .SH SKŁADNIA
182-\fBgroupadd\fR [\fB\-g\fR \fIgid\fR [\fB\-o\fR]] [\fB\-f\fR] \fIgrupa\fR
183+\fBgroupadd\fR [\fB\-g\fR \fIgid\fR [\fB\-o\fR]] [\fB\-f\fR] [\fB-r\fR] \fIgrupa\fR
9a8f7050 184 .SH OPIS
dbe8cb5a
ER
185 Polecenie \fBgroupadd\fR tworzy nowe konto grupy posługując się
186 wartościami podanymi w wierszu poleceń i domyślnymi wartościami z systemu.
187@@ -42,6 +42,10 @@
188 podana groupa już istnieje. Z opcją \fB\-g\fR, jeśli podany gid już istnieje,
189 wybierany jest inny (unikalny) gid (czyli \fB\-g\fR jest wyłączane).
60286d9a 190 .TP
9a8f7050 191+.BI -r
3926222e
ER
192