mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 09:57:41 +00:00
Test parsing LDIF when a backslash is the last char of the file.
If run with address sanitizer, this test will crash when the fix in ceaf706ab74b is reverted.
This commit is contained in:
parent
685150586d
commit
8b898b2ca2
2
MANIFEST
2
MANIFEST
@ -804,6 +804,8 @@ plugins/sudoers/regress/cvtsudoers/test37.out.ok
|
|||||||
plugins/sudoers/regress/cvtsudoers/test37.sh
|
plugins/sudoers/regress/cvtsudoers/test37.sh
|
||||||
plugins/sudoers/regress/cvtsudoers/test38.out.ok
|
plugins/sudoers/regress/cvtsudoers/test38.out.ok
|
||||||
plugins/sudoers/regress/cvtsudoers/test38.sh
|
plugins/sudoers/regress/cvtsudoers/test38.sh
|
||||||
|
plugins/sudoers/regress/cvtsudoers/test39.out.ok
|
||||||
|
plugins/sudoers/regress/cvtsudoers/test39.sh
|
||||||
plugins/sudoers/regress/cvtsudoers/test4.out.ok
|
plugins/sudoers/regress/cvtsudoers/test4.out.ok
|
||||||
plugins/sudoers/regress/cvtsudoers/test4.sh
|
plugins/sudoers/regress/cvtsudoers/test4.sh
|
||||||
plugins/sudoers/regress/cvtsudoers/test5.out.ok
|
plugins/sudoers/regress/cvtsudoers/test5.out.ok
|
||||||
|
@ -337,7 +337,7 @@ depend:
|
|||||||
cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile
|
cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile
|
||||||
|
|
||||||
harness: $(srcdir)/regress/harness.in
|
harness: $(srcdir)/regress/harness.in
|
||||||
cd $(top_builddir) && ./config.status --file plugins/sudoers/regress/harness
|
cd $(top_builddir) && ./config.status --file plugins/sudoers/regress/harness && chmod +x plugins/sudoers/regress/harness
|
||||||
|
|
||||||
Makefile: $(srcdir)/Makefile.in
|
Makefile: $(srcdir)/Makefile.in
|
||||||
cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile
|
cd $(top_builddir) && ./config.status --file plugins/sudoers/Makefile
|
||||||
|
0
plugins/sudoers/regress/cvtsudoers/test39.out.ok
Normal file
0
plugins/sudoers/regress/cvtsudoers/test39.out.ok
Normal file
11
plugins/sudoers/regress/cvtsudoers/test39.sh
Normal file
11
plugins/sudoers/regress/cvtsudoers/test39.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Test handling of a backslash at EOF with no trailing newline.
|
||||||
|
#
|
||||||
|
# If compiled with address sanitizer, cvtsudoers will crash without
|
||||||
|
# the fix in ceaf706ab74b.
|
||||||
|
#
|
||||||
|
|
||||||
|
: ${CVTSUDOERS=cvtsudoers}
|
||||||
|
|
||||||
|
printf 'dn: cn= Manager\\' | $CVTSUDOERS -c "" -b dc=sudo,dc=ws -i ldif -f sudoers
|
@ -189,8 +189,8 @@ sudoers)
|
|||||||
echo "$group/$test: FAIL"
|
echo "$group/$test: FAIL"
|
||||||
diff $out $out_ok || true
|
diff $out $out_ok || true
|
||||||
fi
|
fi
|
||||||
if test -s $err_ok; then
|
|
||||||
ntests=`expr $ntests + 1`
|
ntests=`expr $ntests + 1`
|
||||||
|
if test -s $err_ok; then
|
||||||
if cmp $err $err_ok >/dev/null; then
|
if cmp $err $err_ok >/dev/null; then
|
||||||
if [ $verbose -eq 1 ]; then
|
if [ $verbose -eq 1 ]; then
|
||||||
echo "$group/$test (stderr): OK"
|
echo "$group/$test (stderr): OK"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user