Author: jra
Date: 2006-01-20 16:54:53 +0000 (Fri, 20 Jan 2006)
New Revision: 13054

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13054

Log:
Fix winbind -> winbindd typo. Fix weird aliasing bug
that prevented pidfile from working.
Jeremy.

Modified:
   trunk/source/lib/pidfile.c
   trunk/source/utils/smbcontrol.c


Changeset:
Modified: trunk/source/lib/pidfile.c
===================================================================
--- trunk/source/lib/pidfile.c  2006-01-20 16:29:02 UTC (rev 13053)
+++ trunk/source/lib/pidfile.c  2006-01-20 16:54:53 UTC (rev 13054)
@@ -32,7 +32,8 @@
 {
        int fd;
        char pidstr[20];
-       unsigned ret;
+       pid_t pid;
+       unsigned int ret;
        pstring pidFile;
 
        slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);
@@ -57,7 +58,8 @@
                goto noproc;
        }
        
-       if (!process_exists_by_pid(ret)) {
+       pid = (pid_t)ret;
+       if (!process_exists_by_pid(pid)) {
                goto noproc;
        }
 

Modified: trunk/source/utils/smbcontrol.c
===================================================================
--- trunk/source/utils/smbcontrol.c     2006-01-20 16:29:02 UTC (rev 13053)
+++ trunk/source/utils/smbcontrol.c     2006-01-20 16:54:53 UTC (rev 13054)
@@ -588,7 +588,7 @@
                             const int argc, const char **argv)
 {
        if (argc != 1) {
-               fprintf(stderr, "Usage: smbcontrol winbind online\n");
+               fprintf(stderr, "Usage: smbcontrol winbindd online\n");
                return False;
        }
 
@@ -599,7 +599,7 @@
                             const int argc, const char **argv)
 {
        if (argc != 1) {
-               fprintf(stderr, "Usage: smbcontrol winbind offline\n");
+               fprintf(stderr, "Usage: smbcontrol winbindd offline\n");
                return False;
        }
 
@@ -705,7 +705,7 @@
        poptPrintHelp(*pc, stderr, 0);
 
        fprintf(stderr, "\n");
-       fprintf(stderr, "<destination> is one of \"nmbd\", \"smbd\", 
\"winbind\" or a "
+       fprintf(stderr, "<destination> is one of \"nmbd\", \"smbd\", 
\"winbindd\" or a "
                "process ID\n");
 
        fprintf(stderr, "\n");
@@ -739,6 +739,11 @@
                return pid_to_procid(sys_getpid());
        }
 
+       /* Fix winbind typo. */
+       if (strequal(dest, "winbind")) {
+               dest = "winbindd";
+       }
+
        /* Check for numeric pid number */
 
        result = interpret_pid(dest);

Reply via email to