* [PATCH 0/1] util-linux: add runuser PAM config files
@ 2015-05-15 5:29 Shan Hai
2015-05-15 5:29 ` [PATCH 1/1] " Shan Hai
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Shan Hai @ 2015-05-15 5:29 UTC (permalink / raw)
To: openembedded-core
Add PAM config files for util-linux to fix a runtime failure of the
runuser command.
meta/recipes-core/util-linux/util-linux.inc | 8 ++++++++
meta/recipes-core/util-linux/util-linux/runuser-l.pamd | 4 ++++
meta/recipes-core/util-linux/util-linux/runuser.pamd | 5 +++++
meta/recipes-core/util-linux/util-linux_2.24.2.bb | 2 ++
4 files changed, 19 insertions(+)
create mode 100644 meta/recipes-core/util-linux/util-linux/runuser-l.pamd
create mode 100644 meta/recipes-core/util-linux/util-linux/runuser.pamd
Thanks
Shan Hai
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] util-linux: add runuser PAM config files
2015-05-15 5:29 [PATCH 0/1] util-linux: add runuser PAM config files Shan Hai
@ 2015-05-15 5:29 ` Shan Hai
2015-07-01 2:48 ` [PATCH 0/1] " wenzong fan
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Shan Hai @ 2015-05-15 5:29 UTC (permalink / raw)
To: openembedded-core
The runuser command fails with below error message, add proper PAM
config files to fix the problem. The config files are borrowed from
CentOS 7.0 release.
runuser: Failure setting user credentials
Signed-off-by: Shan Hai <shan.hai@windriver.com>
---
meta/recipes-core/util-linux/util-linux.inc | 6 ++++++
meta/recipes-core/util-linux/util-linux/runuser-l.pamd | 4 ++++
meta/recipes-core/util-linux/util-linux/runuser.pamd | 5 +++++
meta/recipes-core/util-linux/util-linux_2.26.1.bb | 2 ++
4 files changed, 17 insertions(+)
create mode 100644 meta/recipes-core/util-linux/util-linux/runuser-l.pamd
create mode 100644 meta/recipes-core/util-linux/util-linux/runuser.pamd
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 60309a5..0098fc4 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -163,6 +163,12 @@ do_install () {
echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
rm -f ${D}${bindir}/chkdupexe
+
+ if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+ install -d ${D}${sysconfdir}/pam.d
+ install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
+ install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
+ fi
}
# reset and nologin causes a conflict with ncurses-native and shadow-native
diff --git a/meta/recipes-core/util-linux/util-linux/runuser-l.pamd b/meta/recipes-core/util-linux/util-linux/runuser-l.pamd
new file mode 100644
index 0000000..fa1e4d8
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/runuser-l.pamd
@@ -0,0 +1,4 @@
+#%PAM-1.0
+auth include runuser
+session optional pam_keyinit.so force revoke
+session include runuser
diff --git a/meta/recipes-core/util-linux/util-linux/runuser.pamd b/meta/recipes-core/util-linux/util-linux/runuser.pamd
new file mode 100644
index 0000000..37f0e84
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/runuser.pamd
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+session optional pam_keyinit.so revoke
+session required pam_limits.so
+session required pam_unix.so
diff --git a/meta/recipes-core/util-linux/util-linux_2.26.1.bb b/meta/recipes-core/util-linux/util-linux_2.26.1.bb
index 58bc90d..2938e0b 100644
--- a/meta/recipes-core/util-linux/util-linux_2.26.1.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.26.1.bb
@@ -14,6 +14,8 @@ SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
file://configure-sbindir.patch \
file://fix-parallel-build.patch \
${OLDHOST} \
+ file://runuser.pamd \
+ file://runuser-l.pamd \
"
SRC_URI[md5sum] = "2308850946766677f3fabe0685e85de8"
SRC_URI[sha256sum] = "22dc1c957262e2cbdfb4d524a63d5cd4f219d3ac9b5eab570fc771076799bb6e"
--
1.8.5.2.233.g932f7e4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] util-linux: add runuser PAM config files
2015-05-15 5:29 [PATCH 0/1] util-linux: add runuser PAM config files Shan Hai
2015-05-15 5:29 ` [PATCH 1/1] " Shan Hai
@ 2015-07-01 2:48 ` wenzong fan
2015-07-24 8:31 ` wenzong fan
2015-09-17 8:38 ` ChenQi
3 siblings, 0 replies; 5+ messages in thread
From: wenzong fan @ 2015-07-01 2:48 UTC (permalink / raw)
To: openembedded-core
Ping ...
On 05/15/2015 01:29 PM, Shan Hai wrote:
>
> Add PAM config files for util-linux to fix a runtime failure of the
> runuser command.
>
> meta/recipes-core/util-linux/util-linux.inc | 8 ++++++++
> meta/recipes-core/util-linux/util-linux/runuser-l.pamd | 4 ++++
> meta/recipes-core/util-linux/util-linux/runuser.pamd | 5 +++++
> meta/recipes-core/util-linux/util-linux_2.24.2.bb | 2 ++
> 4 files changed, 19 insertions(+)
> create mode 100644 meta/recipes-core/util-linux/util-linux/runuser-l.pamd
> create mode 100644 meta/recipes-core/util-linux/util-linux/runuser.pamd
>
> Thanks
> Shan Hai
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] util-linux: add runuser PAM config files
2015-05-15 5:29 [PATCH 0/1] util-linux: add runuser PAM config files Shan Hai
2015-05-15 5:29 ` [PATCH 1/1] " Shan Hai
2015-07-01 2:48 ` [PATCH 0/1] " wenzong fan
@ 2015-07-24 8:31 ` wenzong fan
2015-09-17 8:38 ` ChenQi
3 siblings, 0 replies; 5+ messages in thread
From: wenzong fan @ 2015-07-24 8:31 UTC (permalink / raw)
To: openembedded-core
Ping again ...
On 05/15/2015 01:29 PM, Shan Hai wrote:
>
> Add PAM config files for util-linux to fix a runtime failure of the
> runuser command.
>
> meta/recipes-core/util-linux/util-linux.inc | 8 ++++++++
> meta/recipes-core/util-linux/util-linux/runuser-l.pamd | 4 ++++
> meta/recipes-core/util-linux/util-linux/runuser.pamd | 5 +++++
> meta/recipes-core/util-linux/util-linux_2.24.2.bb | 2 ++
> 4 files changed, 19 insertions(+)
> create mode 100644 meta/recipes-core/util-linux/util-linux/runuser-l.pamd
> create mode 100644 meta/recipes-core/util-linux/util-linux/runuser.pamd
>
> Thanks
> Shan Hai
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/1] util-linux: add runuser PAM config files
2015-05-15 5:29 [PATCH 0/1] util-linux: add runuser PAM config files Shan Hai
` (2 preceding siblings ...)
2015-07-24 8:31 ` wenzong fan
@ 2015-09-17 8:38 ` ChenQi
3 siblings, 0 replies; 5+ messages in thread
From: ChenQi @ 2015-09-17 8:38 UTC (permalink / raw)
To: Shan Hai, openembedded-core
Without this patch, we would meet errors like below.
Please consider merging this patch.
root@qemux86-64:~# touch 1 2
root@qemux86-64:~# ls
1 2
root@qemux86-64:~# runuser -l root -c ls
runuser: Failure setting user credentials
Best Regards,
Chen Qi
On 05/15/2015 01:29 PM, Shan Hai wrote:
> Add PAM config files for util-linux to fix a runtime failure of the
> runuser command.
>
> meta/recipes-core/util-linux/util-linux.inc | 8 ++++++++
> meta/recipes-core/util-linux/util-linux/runuser-l.pamd | 4 ++++
> meta/recipes-core/util-linux/util-linux/runuser.pamd | 5 +++++
> meta/recipes-core/util-linux/util-linux_2.24.2.bb | 2 ++
> 4 files changed, 19 insertions(+)
> create mode 100644 meta/recipes-core/util-linux/util-linux/runuser-l.pamd
> create mode 100644 meta/recipes-core/util-linux/util-linux/runuser.pamd
>
> Thanks
> Shan Hai
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-17 8:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-15 5:29 [PATCH 0/1] util-linux: add runuser PAM config files Shan Hai
2015-05-15 5:29 ` [PATCH 1/1] " Shan Hai
2015-07-01 2:48 ` [PATCH 0/1] " wenzong fan
2015-07-24 8:31 ` wenzong fan
2015-09-17 8:38 ` ChenQi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.