summaryrefslogtreecommitdiffstats
path: root/meta/packages/tinylogin/tinylogin-1.4/adduser-empty_pwd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/tinylogin/tinylogin-1.4/adduser-empty_pwd.patch')
-rw-r--r--meta/packages/tinylogin/tinylogin-1.4/adduser-empty_pwd.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/packages/tinylogin/tinylogin-1.4/adduser-empty_pwd.patch b/meta/packages/tinylogin/tinylogin-1.4/adduser-empty_pwd.patch
new file mode 100644
index 0000000000..737ac423c4
--- /dev/null
+++ b/meta/packages/tinylogin/tinylogin-1.4/adduser-empty_pwd.patch
@@ -0,0 +1,43 @@
1--- tinylogin-1.4/adduser.c.orig 2004-09-30 18:01:46.000000000 +0200
2+++ tinylogin-1.4/adduser.c 2004-09-30 18:07:01.000000000 +0200
3@@ -249,6 +249,7 @@
4 struct option long_options[] = {
5 { "home", 1, NULL, 'h' },
6 { "disabled-password", 0, NULL, 'D' },
7+ { "empty-password", 0, NULL, 'E' },
8 { "system", 0, NULL, 'S' },
9 { "ingroup", 1, NULL, 'G' },
10 { "no-create-home", 0, NULL, 'H' },
11@@ -287,7 +288,7 @@
12 shell = default_shell;
13
14 /* get args */
15- while ((opt = getopt_long (argc, argv, "h:g:s:G:DSH", long_options, &option_index)) != -1) {
16+ while ((opt = getopt_long (argc, argv, "h:g:s:G:DESH", long_options, &option_index)) != -1) {
17 switch (opt) {
18 case 'h':
19 home = optarg;
20@@ -304,6 +305,9 @@
21 case 'D':
22 setpass = 0;
23 break;
24+ case 'E':
25+ setpass = -1;
26+ break;
27 case 'S':
28 system = 1;
29 break;
30@@ -338,7 +342,12 @@
31
32 /* create a passwd struct */
33 pw.pw_name = (char *)login;
34- pw.pw_passwd = (char *)default_passwd;
35+ if (setpass != -1)
36+ pw.pw_passwd = (char *)default_passwd;
37+ else {
38+ pw.pw_passwd = (char *)"";
39+ setpass = 0;
40+ }
41 pw.pw_uid = 0;
42 pw.pw_gid = 0;
43 pw.pw_gecos = (char *)gecos;