2 Fix dc_client: don't go setuid until after the pidfile has been written.
4 --- distcache-1.4.5/sessclient/sclient.c.setuid
5 +++ distcache-1.4.5/sessclient/sclient.c
7 if(sockperms && !NAL_LISTENER_set_fs_perms(listener, sockperms))
8 SYS_fprintf(SYS_stderr, "Warning, can't set socket permissions "
9 "to '%s', continuing anyway\n", sockperms);
11 - if(!SYS_setuid(user)) {
12 - SYS_fprintf(SYS_stderr, "Error, couldn't become user "
19 /* Define a "now" value that can be used during initialisation and
21 SYS_fprintf(fp, "%lu", (unsigned long)SYS_getpid());
25 + if(!SYS_setuid(user)) {
26 + SYS_fprintf(SYS_stderr, "Error, couldn't become user "
33 /* Choose an appropriate select timeout relative to the retry period */