Make the name of the NTLMSSP client more consistant before we lock it in stone.
[ira/wip.git] / source3 / utils / profiles.c
index afaa83f63846e86e8a8e8b236878814eb7b95ad4..a31674dfb2e2e80554a42cb7bcff35e8c98bd391 100644 (file)
@@ -295,7 +295,6 @@ Hope this helps....  (Although it was "fun" for me to uncover this things,
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <sys/mman.h>
 
 typedef unsigned int DWORD;
 typedef unsigned short WORD;
@@ -448,12 +447,14 @@ static int get_sid(DOM_SID *sid, const unsigned char *sid_str)
 
     SIVAL(&sid->sub_auths[i], 0, auth);
     i++;
-    lstr = strchr(lstr + 1, '-'); 
+    lstr = (const unsigned char *)strchr(lstr + 1, '-'); 
   }
 
   return 1;
 }
 
+#if 0
+
 /* 
  * Replace SID1, component by component with SID2
  * Assumes will never be called with unequal length SIDS
@@ -470,6 +471,8 @@ static void change_sid(DOM_SID *s1, DOM_SID *s2)
   }
 }
 
+#endif
+
 static void print_sid(DOM_SID *sid)
 {
   int i, comps = sid->num_auths;
@@ -606,7 +609,13 @@ int main(int argc, char *argv[])
    * dealing with the records. We are interested in the sk record
    */
   start = 0;
+
+#ifdef HAVE_MMAP
   base = mmap(&start, sbuf.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+#else
+  base = (char *)-1;
+  errno = ENOSYS;
+#endif
 
   if ((int)base == -1) {
     fprintf(stderr, "Could not mmap file: %s, %s\n", poptPeekArg(pc),
@@ -722,7 +731,9 @@ int main(int argc, char *argv[])
     sk_hdr = (SK_HDR *)(base + OFF(IVAL(&sk_hdr->prev_off, 0)));
   } while (sk_off != first_sk_off);
 
+#ifdef HAVE_MMAP
   munmap(base, sbuf.st_size); 
+#endif
 
   poptFreeContext(pc);