- The selinux patch should be applied last.
This commit is contained in:
parent
2873891414
commit
8d758e5360
@ -1,5 +1,99 @@
|
|||||||
--- /dev/null 2004-09-30 04:21:43.103661032 -0400
|
--- coreutils-5.2.1/src/su.c.runuser 2004-10-05 12:50:23.915824850 +0100
|
||||||
+++ coreutils-5.2.1/man/runuser.1 2004-10-04 13:27:51.000000000 -0400
|
+++ coreutils-5.2.1/src/su.c 2004-10-05 12:50:24.254760375 +0100
|
||||||
|
@@ -171,6 +171,10 @@
|
||||||
|
#ifndef USE_PAM
|
||||||
|
char *crypt ();
|
||||||
|
#endif
|
||||||
|
+#ifndef CHECKPASSWD
|
||||||
|
+#define CHECKPASSWD 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
char *getpass ();
|
||||||
|
char *getusershell ();
|
||||||
|
void endusershell ();
|
||||||
|
@@ -740,7 +744,7 @@
|
||||||
|
pw->pw_dir = xstrdup (pw->pw_dir);
|
||||||
|
pw->pw_shell = xstrdup (pw->pw_shell);
|
||||||
|
|
||||||
|
- if (!correct_password (pw))
|
||||||
|
+ if (CHECKPASSWD && !correct_password (pw))
|
||||||
|
{
|
||||||
|
#ifdef SYSLOG_FAILURE
|
||||||
|
log_su (pw, 0);
|
||||||
|
--- coreutils-5.2.1/src/Makefile.am.runuser 2004-10-05 12:50:23.909825991 +0100
|
||||||
|
+++ coreutils-5.2.1/src/Makefile.am 2004-10-05 12:50:24.258759614 +0100
|
||||||
|
@@ -1,6 +1,6 @@
|
||||||
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
|
|
||||||
|
-EXTRA_PROGRAMS = chroot df hostid nice pinky stty su uname uptime users who
|
||||||
|
+EXTRA_PROGRAMS = chroot df hostid nice pinky stty su runuser uname uptime users who
|
||||||
|
|
||||||
|
bin_SCRIPTS = groups
|
||||||
|
bin_PROGRAMS = [ chgrp chown chmod cp dd dircolors du \
|
||||||
|
@@ -67,6 +67,7 @@
|
||||||
|
uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS)
|
||||||
|
|
||||||
|
su_LDADD = $(LDADD) $(LIB_CRYPT) @LIB_PAM@
|
||||||
|
+runuser_LDADD = $(LDADD) $(LIB_CRYPT)
|
||||||
|
|
||||||
|
$(PROGRAMS): ../lib/libfetish.a
|
||||||
|
|
||||||
|
@@ -84,7 +85,7 @@
|
||||||
|
chmod +x $@-t
|
||||||
|
mv $@-t $@
|
||||||
|
|
||||||
|
-all-local: su$(EXEEXT)
|
||||||
|
+all-local: su$(EXEEXT) runuser
|
||||||
|
|
||||||
|
installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
|
||||||
|
|
||||||
|
@@ -100,7 +101,7 @@
|
||||||
|
chmod $(setuid_root_mode) $(installed_su)
|
||||||
|
|
||||||
|
install-root: su$(EXEEXT)
|
||||||
|
- @$(INSTALL_SU)
|
||||||
|
+ @$(INSTALL_SU)
|
||||||
|
|
||||||
|
install-exec-local: su$(EXEEXT)
|
||||||
|
@TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \
|
||||||
|
--- /dev/null 2004-09-27 14:44:32.781829323 +0100
|
||||||
|
+++ coreutils-5.2.1/src/runuser.c 2004-10-05 12:50:24.261759043 +0100
|
||||||
|
@@ -0,0 +1,33 @@
|
||||||
|
+#define CHECKPASSWD 0
|
||||||
|
+#define pam_start my_pam_start
|
||||||
|
+#define pam_end my_pam_end
|
||||||
|
+#define pam_setcred my_pam_setcred
|
||||||
|
+#define pam_open_session my_pam_open_session
|
||||||
|
+#define pam_close_session my_pam_close_session
|
||||||
|
+#define pam_strerror my_pam_strerror
|
||||||
|
+#define pam_getenvlist my_pam_getenvlist
|
||||||
|
+#include "su.c"
|
||||||
|
+int pam_start(const char *service_name, const char *user,
|
||||||
|
+ const struct pam_conv *pam_conversation,
|
||||||
|
+ pam_handle_t **pamh) {
|
||||||
|
+ return PAM_SUCCESS;
|
||||||
|
+}
|
||||||
|
+int pam_end(pam_handle_t *pamh, int pam_status) {
|
||||||
|
+ return PAM_SUCCESS;
|
||||||
|
+}
|
||||||
|
+int pam_setcred(pam_handle_t *pamh, int flags){
|
||||||
|
+ return PAM_SUCCESS;
|
||||||
|
+}
|
||||||
|
+int pam_open_session(pam_handle_t *pamh, int flags){
|
||||||
|
+ return PAM_SUCCESS;
|
||||||
|
+}
|
||||||
|
+int pam_close_session(pam_handle_t *pamh, int flags){
|
||||||
|
+ return PAM_SUCCESS;
|
||||||
|
+}
|
||||||
|
+const char *pam_strerror(pam_handle_t *pamh, int err){
|
||||||
|
+ return "";
|
||||||
|
+}
|
||||||
|
+char **pam_getenvlist(pam_handle_t *pamh){
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
--- /dev/null 2004-09-27 14:44:32.781829323 +0100
|
||||||
|
+++ coreutils-5.2.1/man/runuser.1 2004-10-05 12:50:24.265758283 +0100
|
||||||
@@ -0,0 +1,59 @@
|
@@ -0,0 +1,59 @@
|
||||||
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33.
|
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33.
|
||||||
+.TH RUNUSER "1" "September 2004" "runuser (coreutils) 5.2.1" "User Commands"
|
+.TH RUNUSER "1" "September 2004" "runuser (coreutils) 5.2.1" "User Commands"
|
||||||
@ -60,46 +154,35 @@
|
|||||||
+.B info coreutils su
|
+.B info coreutils su
|
||||||
+.PP
|
+.PP
|
||||||
+should give you access to the complete manual.
|
+should give you access to the complete manual.
|
||||||
--- coreutils-5.2.1/man/Makefile.am.runuser 2004-10-04 13:26:23.000000000 -0400
|
--- coreutils-5.2.1/man/Makefile.am.runuser 2004-01-23 15:54:23.000000000 +0000
|
||||||
+++ coreutils-5.2.1/man/Makefile.am 2004-10-04 13:26:23.000000000 -0400
|
+++ coreutils-5.2.1/man/Makefile.am 2004-10-05 12:50:54.285047667 +0100
|
||||||
@@ -10,7 +10,7 @@
|
@@ -7,7 +7,7 @@
|
||||||
rm.1 rmdir.1 seq.1 sha1sum.1 shred.1 sleep.1 sort.1 split.1 stat.1 stty.1 \
|
link.1 ln.1 logname.1 \
|
||||||
|
ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nice.1 nl.1 nohup.1 od.1 \
|
||||||
|
paste.1 pathchk.1 pinky.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
|
||||||
|
- rm.1 rmdir.1 seq.1 sha1sum.1 shred.1 sleep.1 sort.1 split.1 stat.1 stty.1 \
|
||||||
|
+ rm.1 rmdir.1 runuser.1 seq.1 sha1sum.1 shred.1 sleep.1 sort.1 split.1 stat.1 stty.1 \
|
||||||
su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
|
su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
|
||||||
tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \
|
tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \
|
||||||
- who.1 whoami.1 yes.1 chcon.1 runcon.1
|
who.1 whoami.1 yes.1
|
||||||
+ who.1 whoami.1 yes.1 chcon.1 runcon.1 runuser.1
|
@@ -81,6 +81,7 @@
|
||||||
|
readlink.1: $(common_dep) $(srcdir)/readlink.x ../src/readlink.c
|
||||||
man_aux = $(dist_man_MANS:.1=.x)
|
rm.1: $(common_dep) $(srcdir)/rm.x ../src/rm.c
|
||||||
|
rmdir.1: $(common_dep) $(srcdir)/rmdir.x ../src/rmdir.c
|
||||||
@@ -114,6 +114,7 @@
|
|
||||||
yes.1: $(common_dep) $(srcdir)/yes.x ../src/yes.c
|
|
||||||
chcon.1: $(common_dep) $(srcdir)/chcon.x ../src/chcon.c
|
|
||||||
runcon.1: $(common_dep) $(srcdir)/runcon.x ../src/runcon.c
|
|
||||||
+runuser.1: $(common_dep) $(srcdir)/runuser.x ../src/runuser.c
|
+runuser.1: $(common_dep) $(srcdir)/runuser.x ../src/runuser.c
|
||||||
|
seq.1: $(common_dep) $(srcdir)/seq.x ../src/seq.c
|
||||||
SUFFIXES = .x .1
|
sha1sum.1: $(common_dep) $(srcdir)/sha1sum.x ../src/md5sum.c
|
||||||
|
shred.1: $(common_dep) $(srcdir)/shred.x ../src/shred.c
|
||||||
--- /dev/null 2004-09-30 04:21:43.103661032 -0400
|
--- /dev/null 2004-09-27 14:44:32.781829323 +0100
|
||||||
+++ coreutils-5.2.1/man/runuser.x 2004-10-04 13:26:23.000000000 -0400
|
+++ coreutils-5.2.1/man/runuser.x 2004-10-05 12:50:24.282755049 +0100
|
||||||
@@ -0,0 +1,4 @@
|
@@ -0,0 +1,4 @@
|
||||||
+[NAME]
|
+[NAME]
|
||||||
+runuser \- run a shell with substitute user and group IDs
|
+runuser \- run a shell with substitute user and group IDs
|
||||||
+[DESCRIPTION]
|
+[DESCRIPTION]
|
||||||
+.\" Add any additional description here
|
+.\" Add any additional description here
|
||||||
--- coreutils-5.2.1/README.runuser 2004-10-04 13:26:23.000000000 -0400
|
--- coreutils-5.2.1/tests/help-version.runuser 2004-02-17 16:04:23.000000000 +0000
|
||||||
+++ coreutils-5.2.1/README 2004-10-04 13:26:23.000000000 -0400
|
+++ coreutils-5.2.1/tests/help-version 2004-10-05 12:50:24.284754669 +0100
|
||||||
@@ -11,7 +11,7 @@
|
@@ -130,6 +130,7 @@
|
||||||
df dir dircolors dirname du echo env expand expr factor false fmt fold
|
|
||||||
ginstall groups head hostid hostname id join kill link ln logname ls
|
|
||||||
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
|
|
||||||
- printenv printf ptx pwd readlink rm rmdir runcon seq sha1sum shred sleep sort
|
|
||||||
+ printenv printf ptx pwd readlink rm rmdir runcon runuser seq sha1sum shred sleep sort
|
|
||||||
split stat stty su sum sync tac tail tee test touch tr true tsort tty
|
|
||||||
uname unexpand uniq unlink uptime users vdir wc who whoami yes
|
|
||||||
|
|
||||||
--- coreutils-5.2.1/tests/help-version.runuser 2004-10-04 13:26:23.000000000 -0400
|
|
||||||
+++ coreutils-5.2.1/tests/help-version 2004-10-04 13:26:23.000000000 -0400
|
|
||||||
@@ -132,6 +132,7 @@
|
|
||||||
seq_args=10
|
seq_args=10
|
||||||
sleep_args=0
|
sleep_args=0
|
||||||
su_args=--version
|
su_args=--version
|
||||||
@ -107,97 +190,14 @@
|
|||||||
test_args=foo
|
test_args=foo
|
||||||
|
|
||||||
# This is necessary in the unusual event that there is
|
# This is necessary in the unusual event that there is
|
||||||
--- coreutils-5.2.1/src/su.c.runuser 2004-10-04 13:26:23.000000000 -0400
|
--- coreutils-5.2.1/README.runuser 2004-01-18 07:59:41.000000000 +0000
|
||||||
+++ coreutils-5.2.1/src/su.c 2004-10-04 13:26:23.000000000 -0400
|
+++ coreutils-5.2.1/README 2004-10-05 12:50:24.287754098 +0100
|
||||||
@@ -171,6 +171,10 @@
|
@@ -11,7 +11,7 @@
|
||||||
#ifndef USE_PAM
|
df dir dircolors dirname du echo env expand expr factor false fmt fold
|
||||||
char *crypt ();
|
ginstall groups head hostid hostname id join kill link ln logname ls
|
||||||
#endif
|
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
|
||||||
+#ifndef CHECKPASSWD
|
- printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort
|
||||||
+#define CHECKPASSWD 1
|
+ printenv printf ptx pwd readlink rm rmdir runuser seq sha1sum shred sleep sort
|
||||||
+#endif
|
split stat stty su sum sync tac tail tee test touch tr true tsort tty
|
||||||
+
|
uname unexpand uniq unlink uptime users vdir wc who whoami yes
|
||||||
char *getpass ();
|
|
||||||
char *getusershell ();
|
|
||||||
void endusershell ();
|
|
||||||
@@ -740,7 +744,7 @@
|
|
||||||
pw->pw_dir = xstrdup (pw->pw_dir);
|
|
||||||
pw->pw_shell = xstrdup (pw->pw_shell);
|
|
||||||
|
|
||||||
- if (!correct_password (pw))
|
|
||||||
+ if (CHECKPASSWD && !correct_password (pw))
|
|
||||||
{
|
|
||||||
#ifdef SYSLOG_FAILURE
|
|
||||||
log_su (pw, 0);
|
|
||||||
--- coreutils-5.2.1/src/Makefile.am.runuser 2004-10-04 13:26:23.000000000 -0400
|
|
||||||
+++ coreutils-5.2.1/src/Makefile.am 2004-10-04 14:26:31.123772661 -0400
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
|
||||||
|
|
||||||
-EXTRA_PROGRAMS = chroot df hostid nice pinky stty su uname uptime users who
|
|
||||||
+EXTRA_PROGRAMS = chroot df hostid nice pinky stty su runuser uname uptime users who
|
|
||||||
|
|
||||||
bin_SCRIPTS = groups
|
|
||||||
bin_PROGRAMS = [ chgrp chown chmod chcon cp dd dircolors du \
|
|
||||||
@@ -74,6 +74,7 @@
|
|
||||||
uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS)
|
|
||||||
|
|
||||||
su_LDADD = $(LDADD) $(LIB_CRYPT) @LIB_PAM@
|
|
||||||
+runuser_LDADD = $(LDADD) $(LIB_CRYPT)
|
|
||||||
|
|
||||||
$(PROGRAMS): ../lib/libfetish.a
|
|
||||||
|
|
||||||
@@ -91,7 +92,7 @@
|
|
||||||
chmod +x $@-t
|
|
||||||
mv $@-t $@
|
|
||||||
|
|
||||||
-all-local: su$(EXEEXT)
|
|
||||||
+all-local: su$(EXEEXT) runuser
|
|
||||||
|
|
||||||
installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'`
|
|
||||||
|
|
||||||
@@ -107,7 +108,7 @@
|
|
||||||
chmod $(setuid_root_mode) $(installed_su)
|
|
||||||
|
|
||||||
install-root: su$(EXEEXT)
|
|
||||||
- @$(INSTALL_SU)
|
|
||||||
+ @$(INSTALL_SU)
|
|
||||||
|
|
||||||
install-exec-local: su$(EXEEXT)
|
|
||||||
@TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \
|
|
||||||
--- /dev/null 2004-09-30 04:21:43.103661032 -0400
|
|
||||||
+++ coreutils-5.2.1/src/runuser.c 2004-10-04 13:26:23.000000000 -0400
|
|
||||||
@@ -0,0 +1,33 @@
|
|
||||||
+#define CHECKPASSWD 0
|
|
||||||
+#define pam_start my_pam_start
|
|
||||||
+#define pam_end my_pam_end
|
|
||||||
+#define pam_setcred my_pam_setcred
|
|
||||||
+#define pam_open_session my_pam_open_session
|
|
||||||
+#define pam_close_session my_pam_close_session
|
|
||||||
+#define pam_strerror my_pam_strerror
|
|
||||||
+#define pam_getenvlist my_pam_getenvlist
|
|
||||||
+#include "su.c"
|
|
||||||
+int pam_start(const char *service_name, const char *user,
|
|
||||||
+ const struct pam_conv *pam_conversation,
|
|
||||||
+ pam_handle_t **pamh) {
|
|
||||||
+ return PAM_SUCCESS;
|
|
||||||
+}
|
|
||||||
+int pam_end(pam_handle_t *pamh, int pam_status) {
|
|
||||||
+ return PAM_SUCCESS;
|
|
||||||
+}
|
|
||||||
+int pam_setcred(pam_handle_t *pamh, int flags){
|
|
||||||
+ return PAM_SUCCESS;
|
|
||||||
+}
|
|
||||||
+int pam_open_session(pam_handle_t *pamh, int flags){
|
|
||||||
+ return PAM_SUCCESS;
|
|
||||||
+}
|
|
||||||
+int pam_close_session(pam_handle_t *pamh, int flags){
|
|
||||||
+ return PAM_SUCCESS;
|
|
||||||
+}
|
|
||||||
+const char *pam_strerror(pam_handle_t *pamh, int err){
|
|
||||||
+ return "";
|
|
||||||
+}
|
|
||||||
+char **pam_getenvlist(pam_handle_t *pamh){
|
|
||||||
+ return NULL;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
|
@ -2730,8 +2730,8 @@
|
|||||||
df dir dircolors dirname du echo env expand expr factor false fmt fold
|
df dir dircolors dirname du echo env expand expr factor false fmt fold
|
||||||
ginstall groups head hostid hostname id join kill link ln logname ls
|
ginstall groups head hostid hostname id join kill link ln logname ls
|
||||||
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
|
md5sum mkdir mkfifo mknod mv nice nl nohup od paste pathchk pinky pr
|
||||||
- printenv printf ptx pwd readlink rm rmdir seq sha1sum shred sleep sort
|
- printenv printf ptx pwd readlink rm rmdir runuser seq sha1sum shred sleep sort
|
||||||
+ printenv printf ptx pwd readlink rm rmdir runcon seq sha1sum shred sleep sort
|
+ printenv printf ptx pwd readlink rm rmdir runcon runuser seq sha1sum shred sleep sort
|
||||||
split stat stty su sum sync tac tail tee test touch tr true tsort tty
|
split stat stty su sum sync tac tail tee test touch tr true tsort tty
|
||||||
uname unexpand uniq unlink uptime users vdir wc who whoami yes
|
uname unexpand uniq unlink uptime users vdir wc who whoami yes
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ Patch800: coreutils-i18n.patch
|
|||||||
Patch904: coreutils-5.0-allow_old_options.patch
|
Patch904: coreutils-5.0-allow_old_options.patch
|
||||||
Patch905: coreutils-jday.patch
|
Patch905: coreutils-jday.patch
|
||||||
Patch906: coreutils-fchown.patch
|
Patch906: coreutils-fchown.patch
|
||||||
|
Patch907: coreutils-5.2.1-runuser.patch
|
||||||
|
|
||||||
# From upstream
|
# From upstream
|
||||||
Patch920: coreutils-dateseconds.patch
|
Patch920: coreutils-dateseconds.patch
|
||||||
@ -53,7 +54,6 @@ Patch923: coreutils-copy.patch
|
|||||||
|
|
||||||
#SELINUX Patch
|
#SELINUX Patch
|
||||||
Patch950: coreutils-selinux.patch
|
Patch950: coreutils-selinux.patch
|
||||||
Patch951: coreutils-5.2.1-runuser.patch
|
|
||||||
|
|
||||||
BuildRoot: %_tmppath/%{name}-root
|
BuildRoot: %_tmppath/%{name}-root
|
||||||
BuildRequires: gettext libtermcap-devel bison
|
BuildRequires: gettext libtermcap-devel bison
|
||||||
@ -103,6 +103,7 @@ the old GNU fileutils, sh-utils, and textutils packages.
|
|||||||
%patch904 -p1 -b .allow_old_options
|
%patch904 -p1 -b .allow_old_options
|
||||||
%patch905 -p1 -b .jday
|
%patch905 -p1 -b .jday
|
||||||
%patch906 -p1 -b .fchown
|
%patch906 -p1 -b .fchown
|
||||||
|
%patch907 -p1 -b .runuser
|
||||||
|
|
||||||
# From upstream
|
# From upstream
|
||||||
%patch920 -p1 -b .dateseconds
|
%patch920 -p1 -b .dateseconds
|
||||||
@ -112,7 +113,6 @@ the old GNU fileutils, sh-utils, and textutils packages.
|
|||||||
|
|
||||||
#SELinux
|
#SELinux
|
||||||
%patch950 -p1 -b .selinux
|
%patch950 -p1 -b .selinux
|
||||||
%patch951 -p1 -b .runuser
|
|
||||||
|
|
||||||
|
|
||||||
# Don't run basic-1 test, since it breaks when run in the background
|
# Don't run basic-1 test, since it breaks when run in the background
|
||||||
@ -247,6 +247,9 @@ fi
|
|||||||
/sbin/runuser
|
/sbin/runuser
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 5 2004 Tim Waugh <twaugh@redhat.com>
|
||||||
|
- The selinux patch should be applied last.
|
||||||
|
|
||||||
* Mon Oct 4 2004 Dan Walsh <dwalsh@redhat.com> 5.2.1-30
|
* Mon Oct 4 2004 Dan Walsh <dwalsh@redhat.com> 5.2.1-30
|
||||||
- Mv runuser to /sbin
|
- Mv runuser to /sbin
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user