Patchwork [v2] shadow: remove reference to locale env files from login and su

login
register
mail settings
Submitter Qiang Chen
Date Nov. 22, 2013, 4:59 a.m.
Message ID <1385096386-26320-1-git-send-email-qiang.chen@windriver.com>
Download mbox | patch
Permalink /patch/62191/
State New
Headers show

Comments

Qiang Chen - Nov. 22, 2013, 4:59 a.m.
From: Qiang Chen <qiang.chen@windriver.com>

/etc/default/locale missing message appears when login
and running su <user>

qemu0 login[4189]: pam_env(login:session): Unable to open env file: /etc/default/locale: No such file or directory
qemu0 login[4189]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)

qemu0 su[999]: pam_env(su:session): Unable to open env file: /etc/default/locale: No such file or directory
qemu0 su[999]: pam_unix(su:session): session opened for user root by root(uid=0)

This commit remove reference from pam.d/login and pam.d/su
to /etc/default/locale env file to avoid the error messages
as RHEL, fedora does.

Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
---
 meta/recipes-extended/shadow/files/pam.d/login |    3 ---
 meta/recipes-extended/shadow/files/pam.d/su    |    3 ---
 2 files changed, 6 deletions(-)

Patch

diff --git a/meta/recipes-extended/shadow/files/pam.d/login b/meta/recipes-extended/shadow/files/pam.d/login
index e4dacc2..b340058 100644
--- a/meta/recipes-extended/shadow/files/pam.d/login
+++ b/meta/recipes-extended/shadow/files/pam.d/login
@@ -32,9 +32,6 @@  auth       requisite  pam_nologin.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
 
 # Standard Un*x authentication.
 auth       include      common-auth
diff --git a/meta/recipes-extended/shadow/files/pam.d/su b/meta/recipes-extended/shadow/files/pam.d/su
index 8e35137..8d590a3 100644
--- a/meta/recipes-extended/shadow/files/pam.d/su
+++ b/meta/recipes-extended/shadow/files/pam.d/su
@@ -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