# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../coreutils/disable-su.patch # Copyright (C) 2005 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- --- coreutils-5.2.1/src/Makefile.in~ 2004-03-11 09:59:23.000000000 +0100 +++ coreutils-5.2.1/src/Makefile.in 2005-12-23 21:47:06.533259355 +0100 @@ -16,7 +16,7 @@ -SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c +SOURCES = $(__SOURCES) basename.c cat.c $(chgrp_SOURCES) chmod.c $(chown_SOURCES) chroot.c cksum.c comm.c $(cp_SOURCES) csplit.c cut.c date.c dd.c df.c $(dir_SOURCES) dircolors.c dirname.c du.c echo.c env.c expand.c expr.c factor.c false.c fmt.c fold.c $(ginstall_SOURCES) head.c hostid.c hostname.c id.c join.c kill.c link.c ln.c logname.c $(ls_SOURCES) $(md5sum_SOURCES) mkdir.c mkfifo.c mknod.c $(mv_SOURCES) nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c sort.c split.c stat.c stty.c sum.c sync.c tac.c tail.c tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) wc.c who.c whoami.c yes.c srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -39,7 +39,7 @@ POST_UNINSTALL = : host_triplet = @host@ EXTRA_PROGRAMS = chroot$(EXEEXT) df$(EXEEXT) hostid$(EXEEXT) \ - nice$(EXEEXT) pinky$(EXEEXT) stty$(EXEEXT) su$(EXEEXT) \ + nice$(EXEEXT) pinky$(EXEEXT) stty$(EXEEXT) \ uname$(EXEEXT) uptime$(EXEEXT) users$(EXEEXT) who$(EXEEXT) bin_PROGRAMS = [$(EXEEXT) chgrp$(EXEEXT) chown$(EXEEXT) chmod$(EXEEXT) \ cp$(EXEEXT) dd$(EXEEXT) dircolors$(EXEEXT) du$(EXEEXT) \ @@ -498,9 +498,6 @@ stty_LDADD = $(LDADD) stty_DEPENDENCIES = ../lib/libfetish.a $(am__DEPENDENCIES_1) \ ../lib/libfetish.a -su_SOURCES = su.c -su_OBJECTS = su.$(OBJEXT) -su_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) sum_SOURCES = sum.c sum_OBJECTS = sum.$(OBJEXT) sum_LDADD = $(LDADD) @@ -647,7 +644,7 @@ @AMDEP_TRUE@ ./$(DEPDIR)/shred.Po ./$(DEPDIR)/sleep.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/sort.Po ./$(DEPDIR)/split.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/stat.Po ./$(DEPDIR)/stty.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/su.Po ./$(DEPDIR)/sum.Po \ +@AMDEP_TRUE@ ./$(DEPDIR)/sum.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/sync.Po ./$(DEPDIR)/tac.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/tail.Po ./$(DEPDIR)/tee.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/test.Po ./$(DEPDIR)/touch.Po \ @@ -672,7 +669,7 @@ nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \ printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \ rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \ - sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \ + sort.c split.c stat.c stty.c sum.c sync.c tac.c tail.c \ tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \ unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \ wc.c who.c whoami.c yes.c @@ -686,7 +683,7 @@ nice.c nl.c nohup.c od.c paste.c pathchk.c pinky.c pr.c \ printenv.c printf.c ptx.c pwd.c readlink.c $(rm_SOURCES) \ rmdir.c seq.c setuidgid.c $(sha1sum_SOURCES) shred.c sleep.c \ - sort.c split.c stat.c stty.c su.c sum.c sync.c tac.c tail.c \ + sort.c split.c stat.c stty.c sum.c sync.c tac.c tail.c \ tee.c test.c touch.c tr.c true.c tsort.c tty.c uname.c \ unexpand.c uniq.c unlink.c uptime.c users.c $(vdir_SOURCES) \ wc.c who.c whoami.c yes.c @@ -825,7 +822,7 @@ EXTRA_DIST = dcgen dircolors.hin tac-pipe.c \ groups.sh wheel-gen.pl extract-magic -CLEANFILES = $(SCRIPTS) su +CLEANFILES = $(SCRIPTS) AM_CPPFLAGS = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I../lib # Sometimes, the expansion of $(LIBINTL) includes -lc which may @@ -861,18 +858,8 @@ sleep_LDADD = $(nanosec_libs) tail_LDADD = $(nanosec_libs) uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS) -su_LDADD = $(LDADD) $(LIB_CRYPT) SUFFIXES = .sh -installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'` setuid_root_mode = a=rx,u+s -INSTALL_SU = \ - p=su; \ - echo " $(INSTALL_PROGRAM) $$p $(installed_su)"; \ - $(INSTALL_PROGRAM) $$p $(installed_su); \ - echo " chown root $(installed_su)"; \ - chown root $(installed_su); \ - echo " chmod $(setuid_root_mode) $(installed_su)"; \ - chmod $(setuid_root_mode) $(installed_su) ginstall_SOURCES = install.c copy.c cp-hash.c @@ -1194,9 +1181,6 @@ stty$(EXEEXT): $(stty_OBJECTS) $(stty_DEPENDENCIES) @rm -f stty$(EXEEXT) $(LINK) $(stty_LDFLAGS) $(stty_OBJECTS) $(stty_LDADD) $(LIBS) -su$(EXEEXT): $(su_OBJECTS) $(su_DEPENDENCIES) - @rm -f su$(EXEEXT) - $(LINK) $(su_LDFLAGS) $(su_OBJECTS) $(su_LDADD) $(LIBS) sum$(EXEEXT): $(sum_OBJECTS) $(sum_DEPENDENCIES) @rm -f sum$(EXEEXT) $(LINK) $(sum_LDFLAGS) $(sum_OBJECTS) $(sum_LDADD) $(LIBS) @@ -1377,7 +1361,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/split.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stty.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/su.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sum.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tac.Po@am__quote@ @@ -1608,33 +1591,6 @@ chmod +x $@-t mv $@-t $@ -all-local: su$(EXEEXT) - -install-root: su$(EXEEXT) - @$(INSTALL_SU) - -install-exec-local: su$(EXEEXT) - @TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \ - rm -f $$TMPFILE; \ - echo > $$TMPFILE; \ - can_create_suid_root_executable=no; \ - chown root $$TMPFILE > /dev/null 2>&1 \ - && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \ - && can_create_suid_root_executable=yes; \ - rm -f $$TMPFILE; \ - if test $$can_create_suid_root_executable = yes; then \ - $(INSTALL_SU); \ - else \ - echo "WARNING: insufficient access; not installing su"; \ - echo "NOTE: to install su, run 'make install-root' as root"; \ - fi - -uninstall-local: -# Remove su only if it's one we installed. - @if grep '$(GNU_PACKAGE)' $(installed_su) > /dev/null 2>&1; then \ - echo " rm -f $(installed_su)"; \ - rm -f $(installed_su); \ - else :; fi localedir.h: Makefile @rm -f $@-t echo '#define LOCALEDIR "$(localedir)"' >$@-t --- coreutils-5.2.1/src/Makefile.am~ 2004-02-02 09:12:57.000000000 +0100 +++ coreutils-5.2.1/src/Makefile.am 2005-12-23 21:43:55.650165320 +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 uname uptime users who bin_SCRIPTS = groups bin_PROGRAMS = [ chgrp chown chmod cp dd dircolors du \ @@ -21,7 +21,7 @@ wheel.h wheel-size.h EXTRA_DIST = dcgen dircolors.hin tac-pipe.c \ groups.sh wheel-gen.pl extract-magic -CLEANFILES = $(SCRIPTS) su +CLEANFILES = $(SCRIPTS) AM_CPPFLAGS = -I.. -I$(srcdir) -I$(top_srcdir)/lib -I../lib @@ -63,8 +63,6 @@ uptime_LDADD = $(LDADD) $(GETLOADAVG_LIBS) -su_LDADD = $(LDADD) $(LIB_CRYPT) - $(PROGRAMS): ../lib/libfetish.a $(SCRIPTS): Makefile @@ -81,49 +79,10 @@ chmod +x $@-t mv $@-t $@ -all-local: su$(EXEEXT) - -installed_su = $(DESTDIR)$(bindir)/`echo su|sed '$(transform)'` +all-local: setuid_root_mode = a=rx,u+s -INSTALL_SU = \ - p=su; \ - echo " $(INSTALL_PROGRAM) $$p $(installed_su)"; \ - $(INSTALL_PROGRAM) $$p $(installed_su); \ - echo " chown root $(installed_su)"; \ - chown root $(installed_su); \ - echo " chmod $(setuid_root_mode) $(installed_su)"; \ - chmod $(setuid_root_mode) $(installed_su) - -install-root: su$(EXEEXT) - @$(INSTALL_SU) - -install-exec-local: su$(EXEEXT) - @TMPFILE=$(DESTDIR)$(bindir)/.su-$$$$; \ - rm -f $$TMPFILE; \ - echo > $$TMPFILE; \ -## See if we can create a setuid root executable in $(bindir). -## If not, then don't even try to install su. - can_create_suid_root_executable=no; \ - chown root $$TMPFILE > /dev/null 2>&1 \ - && chmod $(setuid_root_mode) $$TMPFILE > /dev/null 2>&1 \ - && can_create_suid_root_executable=yes; \ - rm -f $$TMPFILE; \ - if test $$can_create_suid_root_executable = yes; then \ - $(INSTALL_SU); \ - else \ - echo "WARNING: insufficient access; not installing su"; \ - echo "NOTE: to install su, run 'make install-root' as root"; \ - fi - -uninstall-local: -# Remove su only if it's one we installed. - @if grep '$(GNU_PACKAGE)' $(installed_su) > /dev/null 2>&1; then \ - echo " rm -f $(installed_su)"; \ - rm -f $(installed_su); \ - else :; fi - # Use `ginstall' in the definition of PROGRAMS and in dependencies to avoid # confusion with the `install' target. The install rule transforms `ginstall' # to install before applying any user-specified name transformations.