diff --git a/plugins/sudoers/Makefile.in b/plugins/sudoers/Makefile.in index 70acbf194..c5e016f5f 100644 --- a/plugins/sudoers/Makefile.in +++ b/plugins/sudoers/Makefile.in @@ -353,10 +353,11 @@ uninstall: rm -f $(DESTDIR)$(sudoersdir)/sudoers check: check_iolog_path - ./check_iolog_path $(srcdir)/regress/iolog_path/data + @./check_iolog_path $(srcdir)/regress/iolog_path/data + @for t in $(srcdir)/regress/testsudoers/test*.sh; do SRCDIR=$(srcdir) $(SHELL) $$t; done clean: - -$(LIBTOOL) --mode=clean rm -f $(PROGS) *.lo *.o *.la *.a stamp-* core *.core core.* + -$(LIBTOOL) --mode=clean rm -f $(PROGS) *.lo *.o *.la *.a stamp-* core *.core core.* test*.out mostlyclean: clean diff --git a/plugins/sudoers/regress/testsudoers/test1.ok b/plugins/sudoers/regress/testsudoers/test1.ok new file mode 100644 index 000000000..f980873c3 --- /dev/null +++ b/plugins/sudoers/regress/testsudoers/test1.ok @@ -0,0 +1,8 @@ +Parses OK. + +Entries for user root: + +ALL = ALL + host matched + +Command unmatched diff --git a/plugins/sudoers/regress/testsudoers/test1.sh b/plugins/sudoers/regress/testsudoers/test1.sh new file mode 100755 index 000000000..974a40548 --- /dev/null +++ b/plugins/sudoers/regress/testsudoers/test1.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Test for NULL dereference with "sudo -g group" when the sudoers rule +# has no runas user or group listed. +# This is RedHat bug Bug 667103. +# + +WANT=${SRCDIR-.}/regress/testsudoers/test1.ok +GOT=test1.out +./testsudoers -g wheel root id > $GOT </dev/null; then + echo "testsudoers 1: OK" +else + echo "testsudoers 1: FAILED" + diff $WANT $GOT +fi