Lindsay Haisley writes:
>
> I can always query the database (authmysql) directly, but since I'm going to
> publish this I'd rather at least use a method which will work with courier
> across any auth mechanism supported by the current courier configuration.
>
I have a script doing that using authtest (it works with ancient versions also)
For more than sporadic use, I would hack authtest to produce a suid executable
that does directly what you're after.
AFAIK you need to be root to access authdaemond's socket.
The relevant piece of the script (where conftest_user is authtest's output)
is the following
if test -f conftest_user; then
[
cat conftest_user | $AWK -F: '
BEGIN { IGNORECASE=1;}
NR == 2 && NF == 2 && $1 ~ /directory/ { print
"av_sophos_alerts_directory=\"" $2 "\"";}
NR == 3 && NF == 2 && $1 ~ /UID.GID/ &&
split($2, uidgid, "/") == 2 {
print "av_sophos_alerts_uidgid=\""
uidgid[1] ":" uidgid[2] "\"";}
' > conftest_user2
]
if test $? -ne 0; then
AC_MSG_ERROR([cannot parse authtest output with $AWK])
fi
. conftest_user2
fi
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users