On Sunday 03 June 2007 21:12:27 Gordon Messmer wrote: > > echo -e "AUTH 1\na\nb\nc\nd" | authProg > > echo -e "AUTH 1\na\nb\nc\nd\n" | authProg > > "echo" does not very closely mimic the auth daemon, as you noticed > earlier. First, it'll add a newline even when you don't want one (since > you're not using -n).
Yes, I forgot to add the -n, as it turns out it still works... echo -en "AUTH 1\na\nb\nc\nd" | authProg echo -en "AUTH 1\na\nb\nc\nd\n" | authProg Whew!! > What would you rather see in an example? Well, a simple bash script somewhat like the one I posted, perhaps generalized a bit more but kept as simple as possible. Why a bash script ? Because of set -x debugging. With DEBUG_LOGIN=2 in authdaemonrc it outlines quite clearly the whole procedure and how authdaemond interacts with both the pipe module and the exec'd authProg program. I've been using the whole courier suite for many years and look how many emails, in this thread, that it took me to get something that actually worked which I could understand. Now I can clearly see in the courier log file how the API works with all incoming, whatever lookups and outgoing data. If some semblence of this script was available anywhere (and I googled extensively) I'm sure I would not have had to send a single email to this list as I would have been a set -x and a few test runs away from seeing for myself how the API was meant to work (the few paragraphs explaining the pipe info are good reference but they don't show useful examples or really explain how to use the functionality). Not everyone is an ace sysadmin with excellent coding skills. --markc ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
