Quoting Sam Varshavchik <[email protected]>:

> eculp writes:
>
>> # ls -l /var/run/authdaemond/
>> total 2
>> -rw-r--r--  1 root  courier  6 Oct 19 09:03 pid
>> -rw-------  1 root  courier  0 Oct 19 09:03 pid.lock
>> srwxrwxrwx  1 root  courier  0 Oct 19 09:03 socket.tmp
>
>> Thanks for your help.  Now I have to try and understand what   
>> "/var/run/authdaemond/socket: Cross-device link" means.
>
> Well, I can tell you what the message means, however I don't know  
> what the explanation itself means.
>
> This is the error code EXDEV, being returned for a failed system  
> call. In this particular case, the system call must be rename().
>
> The relevant code from authdaemond.c:
>
>        strcpy(skun.sun_path, AUTHDAEMONSOCK);
>        strcat(skun.sun_path, ".tmp");
>        unlink(skun.sun_path);
>        if (bind(fd, (const struct sockaddr *)&skun, sizeof(skun)) ||
>                listen(fd, SOMAXCONN) ||
>                chmod(skun.sun_path, 0777) ||
>                rename(skun.sun_path, AUTHDAEMONSOCK) ||
>                fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
>        {
>                perror(AUTHDAEMONSOCK);
>                close(fd);
>                return (-1);
>        }
>
> Fairly rote stuff for creating a filesystem domain socket.
>
> AUTHDAEMONSOCK gets defined in authdaemonrc.h, which is generated by  
> the makefile:
>
>        echo "#define AUTHDAEMONVAR \"@authdaemon...@\"" >>authdaemonrc.h
>        echo "#define AUTHDAEMONPID AUTHDAEMONVAR \"/pid\"" >>authdaemonrc.h
>        echo "#define AUTHDAEMONSOCK AUTHDAEMONVAR \"/socket\""  
> >>authdaemonrc.h
>
> authdaemonvar is set by the configure script. On your platform, your  
> configure script sets it to /var/run/authdaemond, apparently.
>
> authdaemond creates AUTHDAEMONVAR/socket.tmp, then renames it to  
> AUTHDAEMONVAR/socket. The rename operation is failing with this  
> error code. That's why your ls shows the socket.tmp flotsam left in  
> the directory. The rename() operation failed.
>
> You can look up what EXDEV means for yourself. The only remaining  
> piece of the puzzle is how rename(AUTHDAEMONVAR/socket.tmp,  
> AUTHDAEMONVAR/socket) could possibly result in the EXDEV error. This  
> is a new one to me. The only thing I'm sure of, is once you figure  
> out what the problem is, the explanation should be a fascinating read.

Thanks for your explanations, Sam.  I hope to share and/or enjoy that  
"fascinating read" soon.  I'm going to sleep on it tonight and try  
again tomorrow, a new day.

ed


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to