]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
basic_smb_auth is C++, adjust make flags accordingly. Also clean up string types...
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Mon, 1 Feb 2010 14:30:22 +0000 (15:30 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Mon, 1 Feb 2010 14:30:22 +0000 (15:30 +0100)
helpers/basic_auth/SMB/Makefile.am
helpers/basic_auth/SMB/basic_smb_auth.cc

index e8f868564963ef4ebc5636a1ac6d020bde62c5b3..62d8c37262b6e755f5b5b21ac5465948c7786f0c 100644 (file)
@@ -15,7 +15,7 @@ libexec_SCRIPTS       = $(SMB_AUTH_HELPER)
 
 libexec_PROGRAMS = basic_smb_auth
 basic_smb_auth_SOURCES= basic_smb_auth.cc
-basic_smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\"
+basic_smb_auth_CXXFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\"
 basic_smb_auth_LDADD = $(COMPAT_LIB) $(XTRA_LIBS)
 
 EXTRA_DIST = basic_smb_auth.sh COPYING-2.0
index 4ea3a3daebcc2e4415c816e1e9986d91c5918e40..497ee5292035d8d7d731000454745e1e63c7bfb8 100644 (file)
 #define NMB_BROADCAST  2
 
 struct SMBDOMAIN {
-    char *name;                        /* domain name */
-    char *sname;               /* match this with user input */
-    char *passthrough;         /* pass-through authentication */
-    char *nmbaddr;             /* name service address */
+    const char *name;          /* domain name */
+    const char *sname;         /* match this with user input */
+    const char *passthrough;   /* pass-through authentication */
+    const char *nmbaddr;       /* name service address */
     int nmbcast;               /* broadcast or unicast */
     char *authshare;           /* share name of auth file */
-    char *authfile;            /* pathname of auth file */
+    const char *authfile;      /* pathname of auth file */
     struct SMBDOMAIN *next;    /* linked list */
 };
 
@@ -115,7 +115,7 @@ main(int argc, char *argv[])
     char *domname;
     FILE *p;
     int debug = 0;
-    char *shcmd;
+    const char *shcmd;
 
     /* make standard output line buffered */
     if (setvbuf(stdout, NULL, _IOLBF, 0) != 0)
@@ -139,7 +139,7 @@ main(int argc, char *argv[])
             dom->passthrough = "";
             dom->nmbaddr = "";
             dom->nmbcast = NMB_BROADCAST;
-            dom->authshare = "NETLOGON";
+            dom->authshare = (char *)"NETLOGON";
             dom->authfile = "proxyauth";
             dom->next = NULL;
 
@@ -202,7 +202,7 @@ main(int argc, char *argv[])
     shcmd = debug ? HELPERSCRIPT : HELPERSCRIPT " > /dev/null 2>&1";
 
     /* pass to helper script */
-    if (putenv("SAMBAPREFIX=" SAMBAPREFIX) != 0)
+    if (putenv((char *)"SAMBAPREFIX=" SAMBAPREFIX) != 0)
         return 1;
 
     while (1) {