shadow: remove reference to locale env files from su
PATCH 1/1 shadow: remove reference to locale env files from su
From: Qiang Chen <[email protected]>
The /etc/default/locale missing message appears when running su <user>
root@qemu0:/var/log# su root root@qemu0:/var/log# tail auth.log Oct 8 07:47:54 qemu0 login[983]: pam_unix(login:session): session opened for user root by LOGIN(uid=0) Oct 8 07:47:55 qemu0 login[995]: ROOT LOGIN on '/dev/console' Oct 8 07:48:21 qemu0 su[999]: Successful su for root by root Oct 8 07:48:21 qemu0 su[999]: + /dev/console root:root Oct 8 07:48:21 qemu0 su[999]: pam_env(su:session): Unable to open env file: /etc/default/locale: No such file or directory Oct 8 07:48:21 qemu0 su[999]: pam_unix(su:session): session opened for user root by root(uid=0)
This commit remove reference from pam.d/su to /etc/default/locale env file to avoid the error messages.
--- meta/recipes-extended/shadow/files/pam.d/su | 3 --- meta/recipes-extended/shadow/shadow.inc | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)
meta/recipes-extended/shadow/files/pam.d/su +0 -3
@@ -34,9 +34,6 @@ auth sufficient pam_rootok.so # # parsing /etc/environment needs "readenv=1" session required pam_env.so readenv=1 -# locale variables are also kept into /etc/default/locale in etch -# reading this file *in addition to /etc/environment* does not hurt -session required pam_env.so readenv=1 envfile=/etc/default/locale # Defines the MAIL environment variable # However, userdel also needs MAIL_DIR and MAIL_FILE variables
meta/recipes-extended/shadow/shadow.inc +1 -1
@@ -44,7 +44,7 @@ SRC_URI_append_class-nativesdk = " \ SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" -PR = "r13" +PR = "r14" # Additional Policy files for PAM PAM_SRC_URI = "file://pam.d/chfn \
Signature · 1 line
1.7.9.5
Quoted 27 lines · On 11/21/2013 01:14 AM, [email protected] wrote:
From: Qiang Chen <[email protected]>
The
/etc/default/localemissing message appears when running su <user>root@qemu0:/var/log# su root root@qemu0:/var/log# tail auth.log Oct 8 07:47:54 qemu0 login[983]: pam_unix(login:session): session opened for user root by LOGIN(uid=0) Oct 8 07:47:55 qemu0 login[995]: ROOT LOGIN on '/dev/console' Oct 8 07:48:21 qemu0 su[999]: Successful su for root by root Oct 8 07:48:21 qemu0 su[999]: + /dev/console root:root Oct 8 07:48:21 qemu0 su[999]: pam_env(su:session): Unable to open env file: /etc/default/locale: No such file or directory Oct 8 07:48:21 qemu0 su[999]: pam_unix(su:session): session opened for user root by root(uid=0)This commit remove reference from pam.d/su to
/etc/default/localeenv file to avoid the error messages.Signed-off-by Qiang Chen <[email protected]>--- meta/recipes-extended/shadow/files/pam.d/su | 3 --- meta/recipes-extended/shadow/shadow.inc | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)meta/recipes-extended/shadow/files/pam.d/su +0
-0
meta/recipes-extended/shadow/files/pam.d/su auth sufficient pam_rootok.so · line 37
Quoted 7 lines
meta/recipes-extended/shadow/files/pam.d/su +0
-3@@ -34,9 +34,6 @@ auth sufficient pam_rootok.so # # parsing /etc/environment needs "readenv=1" session required pam_env.so readenv=1 -# locale variables are also kept into /etc/default/locale in etch -# reading this file *in addition to /etc/environment* does not hurt -session required pam_env.so readenv=1 envfile=/etc/default/locale
Should we be providing an empty locale file instead, what happens if someone wants to use the locale mechanism?
meta/recipes-extended/shadow/shadow.inc SRC_URI_append_class-nativesdk = " \ · line 48
Quoted 13 lines
meta/recipes-extended/shadow/files/pam.d/su +0
-0# Defines the MAIL environment variable # However, userdel also needs MAIL_DIR and MAIL_FILE variablesmeta/recipes-extended/shadow/shadow.inc +1
-1@@ -44,7 +44,7 @@ SRC_URI_append_class-nativesdk = " \ SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" -PR = "r13" +PR = "r14"
No more PR bumps please.
Sau!
Quoted 3 lines
meta/recipes-extended/shadow/shadow.inc +0
-0# Additional Policy files for PAM PAM_SRC_URI = "file://pam.d/chfn \
Quoted 23 lines · Saul Wold
Quoted 22 lines · On 11/21/2013 01:14 AM, [email protected] wrote:
From: Qiang Chen <[email protected]>
The/etc/default/localemissing message appears when running su <user>root@qemu0:/var/log# su root root@qemu0:/var/log# tail auth.log Oct 8 07:47:54 qemu0 login[983]: pam_unix(login:session): session opened for user root by LOGIN(uid=0) Oct 8 07:47:55 qemu0 login[995]: ROOT LOGIN on '/dev/console' Oct 8 07:48:21 qemu0 su[999]: Successful su for root by root Oct 8 07:48:21 qemu0 su[999]: + /dev/console root:root Oct 8 07:48:21 qemu0 su[999]: pam_env(su:session): Unable to open env file: /etc/default/locale: No such file or directory Oct 8 07:48:21 qemu0 su[999]: pam_unix(su:session): session opened for user root by root(uid=0) This commit remove reference from pam.d/su to /etc/default/locale env file to avoid the error messages. Signed-off-by: Qiang Chen <[email protected]> --- meta/recipes-extended/shadow/files/pam.d/su | 3 --- meta/recipes-extended/shadow/shadow.inc | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-)meta/recipes-extended/shadow/files/pam.d/su +0
-0@@ -34,9 +34,6 @@ auth sufficient pam_rootok.so
Quoted 8 lines
meta/recipes-extended/shadow/files/pam.d/su auth sufficient pam_rootok.so · line 39
Quoted 6 lines
meta/recipes-extended/shadow/files/pam.d/su +0
-3# # parsing /etc/environment needs "readenv=1" session required pam_env.so readenv=1 -# locale variables are also kept into /etc/default/locale in etch -# reading this file *in addition to /etc/environment* does not hurt -session required pam_env.so readenv=1 envfile=/etc/default/localeShould we be providing an empty locale file instead, what happens if someone wants to use the locale mechanism?
Hi Sau,
Thanks for your comments !
I didn't see much sense providing an empty/faked locale file there, as we didn't provide a update-locale command tool either.
Meanwhile, RHEL, fedora didn't require an env file to /etc/default/locale too. If someone really cares the env for locale related, they just need specify their envfile instead our faked env file.
Quoted 4 lines
Quoted 4 lines
meta/recipes-extended/shadow/files/pam.d/su +0
-0# Defines the MAIL environment variable # However, userdel also needs MAIL_DIR and MAIL_FILE variablesmeta/recipes-extended/shadow/shadow.inc +0
-0
Quoted 8 lines
meta/recipes-extended/shadow/shadow.inc SRC_URI_append_class-nativesdk = " \ · line 46
Quoted 7 lines
meta/recipes-extended/shadow/shadow.inc +1
-1@@ -44,7 +44,7 @@ SRC_URI_append_class-nativesdk = " \ SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" -PR = "r13" +PR = "r14"No more PR bumps please.
OK. I will send V2 patch dropping PR bumps and remove login reference to /etc/default/locale too.
Thanks !
Qiang
Quoted 4 lines
Sau!
Quoted 2 lines
meta/recipes-extended/shadow/shadow.inc +0
-0# Additional Policy files for PAM PAM_SRC_URI = "file://pam.d/chfn \