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
#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 */
};
char *domname;
FILE *p;
int debug = 0;
- char *shcmd;
+ const char *shcmd;
/* make standard output line buffered */
if (setvbuf(stdout, NULL, _IOLBF, 0) != 0)
dom->passthrough = "";
dom->nmbaddr = "";
dom->nmbcast = NMB_BROADCAST;
- dom->authshare = "NETLOGON";
+ dom->authshare = (char *)"NETLOGON";
dom->authfile = "proxyauth";
dom->next = NULL;
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) {