File shadow-util-linux.patch of Package shadow
163
1
Add variables referred by util-linux login, runuser and su, but not by
2
shadow.
3
4
Delete variables used by shadow implementation of login, su and runuser
5
that has no use in util-linux implementation.
6
7
Index: etc/login.defs
8
===================================================================
9
--- etc/login.defs.orig
10
+++ etc/login.defs
11
12
#
13
# /etc/login.defs - Configuration control definitions for the shadow package.
14
+# Some variables are used by login(1), su(1) and runuser(1) from util-linux
15
+# package as well pam pam_unix(8) from pam package.
16
#
17
# $Id$
18
#
19
20
LOG_UNKFAIL_ENAB no
21
22
#
23
-# Enable logging of successful logins
24
+# Enable "syslog" logging of newgrp(1) and sg(1) activity.
25
#
26
-LOG_OK_LOGINS no
27
28
#
29
# Limit the highest user ID number for which the lastlog entries should
30
31
#LASTLOG_UID_MAX
32
33
#
34
-# Enable "syslog" logging of su(1) activity - in addition to sulog file logging.
35
-# SYSLOG_SG_ENAB does the same for newgrp(1) and sg(1).
36
+# Enable "syslog" logging of newgrp(1) and sg(1) activity - in addition
37
+# to sulog file logging.
38
#
39
-SYSLOG_SU_ENAB yes
40
SYSLOG_SG_ENAB yes
41
42
#
43
44
#MOTD_FILE /etc/motd:/usr/lib/news/news-motd
45
46
#
47
+# If set to "yes", login stops display content specified by MOTD_FILE after
48
+# the first accessible item in the list.
49
+#
50
+#MOTD_FIRSTONLY no
51
+
52
+#
53
# If defined, file which maps tty line to TERM environment parameter.
54
# Each line of the file is in a format similar to "vt100 tty01".
55
#
56
57
HUSHLOGIN_FILE .hushlogin
58
#HUSHLOGIN_FILE /etc/hushlogins
59
60
+# If this variable is set to "yes", hostname will be suppressed in the
61
+# login: prompt.
62
+#LOGIN_PLAIN_PROMPT no
63
+
64
#
65
# *REQUIRED* The default PATH settings, for superuser and normal users.
66
#
67
# (they are minimal, add the rest in the shell startup files)
68
-ENV_SUPATH PATH=/sbin:/bin:/usr/sbin:/usr/bin
69
-ENV_PATH PATH=/bin:/usr/bin
70
+#
71
+# ENV_PATH: The default PATH settings for non-root.
72
+#
73
+# ENV_ROOTPATH: The default PATH settings for root
74
+# (used by login, su and runuser).
75
+#
76
+# ENV_SUPATH is an ENV_ROOTPATH override for su and runuser
77
+# (and falback for login).
78
+#
79
+ENV_PATH /bin:/usr/bin
80
+ENV_ROOTPATH /sbin:/bin:/usr/sbin:/usr/bin
81
+#ENV_SUPATH /sbin:/bin:/usr/sbin:/usr/bin
82
+
83
+# If this variable is set to "yes", su will always set path. every su
84
+# call will overwrite the PATH variable.
85
+#
86
+# Per default, only "su -" will set a new PATH.
87
+#
88
+ALWAYS_SET_PATH no
89
90
#
91
# Terminal permissions
92
93
TTYGROUP tty
94
TTYPERM 0600
95
96
-#
97
-# Login configuration initializations:
98
-#
99
-# ERASECHAR Terminal ERASE character ('\010' = backspace).
100
-# KILLCHAR Terminal KILL character ('\025' = CTRL/U).
101
-#
102
-# The ERASECHAR and KILLCHAR are used only on System V machines.
103
-#
104
-# Prefix these values with "0" to get octal, "0x" to get hexadecimal.
105
-#
106
-ERASECHAR 0177
107
-KILLCHAR 025
108
-
109
# Default initial "umask" value used by login(1) on non-PAM enabled systems.
110
# Default "umask" value for pam_umask(8) on PAM enabled systems.
111
# UMASK is also used by useradd(8) and newusers(8) to set the mode for new
112
113
LOGIN_RETRIES 5
114
115
#
116
+# Tell login to only re-prompt for the password if authentication
117
+# failed, but the username is valid. The default value is no.
118
+#
119
+LOGIN_KEEP_USERNAME no
120
+
121
+#
122
# Max time in seconds for login(1)
123
#
124
LOGIN_TIMEOUT 60
125
Index: lib/getdef.c
126
===================================================================
127
--- lib/getdef.c.orig
128
+++ lib/getdef.c
129
130
{"LOGIN_STRING", NULL}, \
131
{"MAIL_CHECK_ENAB", NULL}, \
132
{"MOTD_FILE", NULL}, \
133
+ {"MOTD_FIRSTONLY", NULL}, \
134
{"NOLOGINS_FILE", NULL}, \
135
{"OBSCURE_CHECKS_ENAB", NULL}, \
136
{"PASS_ALWAYS_WARN", NULL}, \
137
138
139
#define NUMDEFS (sizeof(def_table)/sizeof(def_table[0]))
140
static struct itemdef def_table[] = {
141
+ {"ALWAYS_SET_PATH", NULL},
142
{"CHARACTER_CLASS", NULL},
143
{"CHFN_RESTRICT", NULL},
144
{"CONSOLE_GROUPS", NULL},
145
146
{"DEFAULT_HOME", NULL},
147
{"ENCRYPT_METHOD", NULL},
148
{"ENV_PATH", NULL},
149
+ {"ENV_ROOTPATH", NULL},
150
{"ENV_SUPATH", NULL},
151
{"ERASECHAR", NULL},
152
{"FAIL_DELAY", NULL},
153
154
{"HUSHLOGIN_FILE", NULL},
155
{"KILLCHAR", NULL},
156
{"LASTLOG_UID_MAX", NULL},
157
+ {"LOGIN_KEEP_USERNAME", NULL},
158
{"LOGIN_RETRIES", NULL},
159
+ {"LOGIN_PLAIN_PROMPT", NULL},
160
{"LOGIN_TIMEOUT", NULL},
161
{"LOG_OK_LOGINS", NULL},
162
{"LOG_UNKFAIL_ENAB", NULL},
163