Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,8 @@ plugins/sudoers/regress/cvtsudoers/test40.out.ok
plugins/sudoers/regress/cvtsudoers/test40.sh
plugins/sudoers/regress/cvtsudoers/test41.out.ok
plugins/sudoers/regress/cvtsudoers/test41.sh
plugins/sudoers/regress/cvtsudoers/test42.out.ok
plugins/sudoers/regress/cvtsudoers/test42.sh
plugins/sudoers/regress/cvtsudoers/test5.out.ok
plugins/sudoers/regress/cvtsudoers/test5.sh
plugins/sudoers/regress/cvtsudoers/test6.out.ok
Expand Down
1 change: 1 addition & 0 deletions plugins/sudoers/parse_ldif.c
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ sudoers_parse_ldif(struct sudoers_parse_tree *parse_tree,
memcpy(tmp + savedlen, line, (size_t)len + 1);
free(line);
line = tmp;
len += (ssize_t)savedlen;
savedline = NULL;
}

Expand Down
2 changes: 2 additions & 0 deletions plugins/sudoers/regress/cvtsudoers/test42.out.ok
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# sudoRole millert
millert ALL = /usr/bin/systemctl restart httpd, /usr/bin/ls
20 changes: 20 additions & 0 deletions plugins/sudoers/regress/cvtsudoers/test42.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#
# Test an LDIF attribute folded over more than two lines.
#

: ${CVTSUDOERS=cvtsudoers}

$CVTSUDOERS -c "" -i ldif -b "ou=SUDOers,dc=sudo,dc=ws" -f sudoers <<EOF
dn: cn=millert,ou=SUDOers,dc=sudo,dc=ws
objectClass: top
objectClass: sudoRole
cn: millert
sudoUser: millert
sudoHost: ALL
sudoCommand: /usr/bin/sys
temctl rest
art httpd
sudoCommand: /usr/bin/ls

EOF