Bug#784408: milter-greylist should not require sudo
On Tue, May 05, 2015 at 11:31:33PM -0600, Cory Petkovsek wrote: > I suggest a change like the following: > # diff -u milter-greylist.old milter-greylist > --- milter-greylist.old 2015-05-05 23:15:14.787770285 -0600 > +++ milter-greylist 2015-05-05 23:15:33.644436946 -0600 > @@ -94,7 +94,7 @@ > >reload) > echo -n "Checking config: " > - if sudo -c "$DAEMON -c" $USER 2>&1 |grep -v 'config .* okay$' > |grep . >&2 > + if $DAEMON -c 2>&1 |grep -v 'config .* okay$' |grep . >&2 > then > echo "failed. Quitting with error, no action taken." > exit 1 Actually, no. I think "sudo" is a typo for "su", which uses that syntax. Running the check as a user that is not the one that the daemon runs as risks the check missing permissions errors or worse. -- Paul Martin -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#784408: milter-greylist should not require sudo
Package: milter-greylist Version: 4.5.11-1 /etc/init.d/milter-greylist Calls sudo, but it should not. # /etc/init.d/milter-greylist reload Checking config: ./milter-greylist.old: 97: ./milter-greylist.old: sudo: not found failed. Quitting with error, no action taken. I suggest a change like the following: # diff -u milter-greylist.old milter-greylist --- milter-greylist.old 2015-05-05 23:15:14.787770285 -0600 +++ milter-greylist 2015-05-05 23:15:33.644436946 -0600 @@ -94,7 +94,7 @@ reload) echo -n "Checking config: " - if sudo -c "$DAEMON -c" $USER 2>&1 |grep -v 'config .* okay$' |grep . >&2 + if $DAEMON -c 2>&1 |grep -v 'config .* okay$' |grep . >&2 then echo "failed. Quitting with error, no action taken." exit 1 Cory -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org