I might have figure out a way:
I wrote a small bash script and named it /usr/bin/mydot and gave it permissions 766:
Code:
#!/bin/bash
echo "/usr/bin/dot run as $(whoami)" 1>>/tmp/dotrun.log 2>>dotrun.err
/usr/bin/dot $*
I then ran:
Code:
cd /tmp
touch dotrun.log
touch dotrun.err
chmod 666 dotrun.log
chmod 666 dotrun.err
I then configured bugzilla to run /usr/bin/mydot instead of /usr/bin/dot.
I ran:
Code:
sudo -u ftp mydot test
It logged:
Code:
/usr/bin/dot run as ftp
I then tried to get bugzilla to run "mydot", and my log now looks like this:
Code:
/usr/bin/dot run as ftp
/usr/bin/dot run as
/usr/bin/dot run as
Notice the last two lines don't show the user, so it didn't work.
Anybody got a better way?
Bookmarks