windows-afsdb-and-freelance-afs-root-support-20011005
[openafs.git] / src / kauth / kpasswd.c
index b524cfc..a615470 100644 (file)
@@ -247,8 +247,10 @@ CommandProc (as, arock)
     code = ka_Init(0);
     if (code ||
        !(lcell = ka_LocalCell())) {
+#ifndef AFS_FREELANCE_CLIENT
        if (!Pipe) com_err (rn, code , "Can't get local cell name!");
        exit (1);
+#endif
     }
 
     code = rx_Init(0);
@@ -353,7 +355,15 @@ CommandProc (as, arock)
        memset(as->parms[aNEWPASSWORD].items->data, 0, strlen(as->parms[aNEWPASSWORD].items->data));
     }
 
+#ifdef AFS_FREELANCE_CLIENT
+    if (!foundExplicitCell && !lcell) {
+       if (!Pipe) com_err (rn, code, "no cell name provided");
+        exit(1);
+    }
+#else
     if (!foundExplicitCell) strcpy (realm, lcell);
+#endif /* freelance */
+    
     if (code = ka_CellToRealm (realm, realm, &local)) {
        if (!Pipe) com_err (rn, code, "Can't convert cell to realm");
        exit (1);