saslauthd init script does not allow movement of PID
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Ubuntu Server papercuts |
Medium
|
Unassigned | ||
| | cyrus-sasl2 (Ubuntu) |
Low
|
Unassigned | ||
Bug Description
Binary package hint: sasl2-bin
Package: sasl2-bin
OS: Ubuntu Server 6.06 LTS
All Updates Applied: Yes
Problem:
Due to having to move the Cyrus-SASL mux socket to another directory, to allow postfix access to it, I later found that the init script at /etc/init.
test -z "$dir" || createdir $dir
dir always gets returned an empty string, and also the OWNER:GROUP:
I removed those two lines and replaced them with the following:
test -d $PWDIR || createdir root sasl 710 $PWDIR
Now when you change the location of the pid and socket, by setting in /etc/defaults/
MECHANISMS="ldap"
PARAMS="-O /etc/saslauthd.conf -m /var/spool/
PWDIR="
PIDFILE=
The directory, if non-existant is correctly created, and the the pid is known to the stop function.
| Changed in cyrus-sasl2: | |
| assignee: | nobody → pitti |
| importance: | Undecided → Low |
| El Diablo (el-diablo) wrote : | #1 |
| Changed in cyrus-sasl2: | |
| status: | Unconfirmed → In Progress |
| Jörn Dreyer (j.dreyer) wrote : | #2 |
At the end of /etc/defaults/
SYMLINK=
and in the initscript I added this before the createdir function:
#bug https:/
test -h $SYMLINK || ln -s $RUN_DIR $SYMLINK
the initscript will automagically create the $RUN_DIR by parsing the -m option if specified in $OPTIONS
| Changed in cyrus-sasl2: | |
| assignee: | pitti → ubuntu-server |
| status: | In Progress → Confirmed |
| Christopher DeMarco (demarco) wrote : | #3 |
There is an undocumented option to imapd.conf ``sasl_
| Changed in server-papercuts: | |
| importance: | Undecided → Medium |
| status: | New → Confirmed |
| Changed in server-papercuts: | |
| milestone: | none → lucid-beta-1 |
| Changed in cyrus-sasl2 (Ubuntu): | |
| assignee: | Ubuntu Server Team (ubuntu-server) → nobody |
| Changed in server-papercuts: | |
| milestone: | lucid-beta-1 → lucid-beta-2 |
| Thierry Carrez (ttx) wrote : | #4 |
I think this is already fixed...
With the current version (in Lucid), you can't set PWDIR in the defaults file, its derived from the "-m" option. Then the following bit of code ensures the directory is created with the right rights:
if dpkg-statoverride --list $RUN_DIR > /dev/null; then
createdir `dpkg-statoverride --list $RUN_DIR`
else
createdir root sasl 710 $RUN_DIR
fi
Please reopen if you can reproduce with current lucid.
| Changed in cyrus-sasl2 (Ubuntu): | |
| status: | Confirmed → Fix Released |
| Changed in server-papercuts: | |
| status: | Confirmed → Fix Released |


NOTE: I found yesterday also that as Cyrus-IMAP requires the socket to be located in /var/run/saslauthd/ , and would seem that you can not tell Cyrus-IMAP where to look for the socket (I am yet to 100% confirm this), that I had to make a symlink to the location where my socket was. Also as on reboots the symlink gets destroyed, I added the following two lines to my /etc/init. d/saslauthd script:
At the top in the variables section I added:
SYMLINK= "/var/run/ saslauthd"
after the test to create the socket directory (as stated above), I added the following line:
test -h $SYMLINK || ln -s $PWDIR $SYMLINK
Hope this information is of use to you guys.