#endif
#endif
+/* use gcc attribute to check printf fns */
+#ifdef __GNUC__
+#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
+#else
+#define PRINTF_ATTRIBUTE(a1, a2)
+#endif
+
#ifdef RELIANTUNIX
/*
* <unistd.h> has to be included before any other to get
#endif
/* add varargs prototypes with printf checking */
-#ifdef __GNUC__
-#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
-#else
-#define PRINTF_ATTRIBUTE(a1, a2)
-#endif
-
int fdprintf(int , char *, ...) PRINTF_ATTRIBUTE(2,3);
#ifndef HAVE_SNPRINTF
int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);
int asprintf(char **,char *, ...) PRINTF_ATTRIBUTE(2,3);
#endif
+/* we used to use these fns, but now we have good replacements
+ for snprintf and vsnprintf */
+#define slprintf snprintf
+#define vslprintf vsnprintf
+
#endif /* _INCLUDES_H */
void CatchChild(void);
void CatchChildLeaveStatus(void);
-/*The following definitions come from lib/slprintf.c */
-
-int vslprintf(char *str, int n, char *format, va_list ap);
-
/*The following definitions come from lib/smbrun.c */
int smbrun(char *cmd, int *outfd);
char param[8];
char *rparam=NULL, *rdata=NULL;
int rparam_count=0, rdata_count=0;
- TALLOC_CTX *mem_ctx;
+ TALLOC_CTX *mem_ctx=NULL;
prs_struct pd;
SEC_DESC *psd = NULL;
ZERO_STRUCTP(user);
user->mem_ctx = talloc_init();
- DEBUG(10, ("pdb_init_sam: obtained a talloc context of 0x%x\n", user->mem_ctx));
+ DEBUG(10, ("pdb_init_sam: obtained a talloc context of 0x%x\n",
+ (unsigned)user->mem_ctx));
user->logon_time = (time_t)0;
user->logoff_time = (time_t)-1;
return;
/* free upany memory used */
- DEBUG(10, ("pdb_clear_sam: releasing memory. talloc context is 0x%x\n",user->mem_ctx));
+ DEBUG(10, ("pdb_clear_sam: releasing memory. talloc context is 0x%x\n",(unsigned)user->mem_ctx));
talloc_destroy (user->mem_ctx);
/* now initialize */
smb_apasswd, smb_apasslen,
smb_ntpasswd, smb_ntpasslen);
if(ret) {
- struct passwd *pwd;
+ struct passwd *pwd=NULL;
/*
* User validated ok against Domain controller.
{
BOOL ret = False;
BOOL user_exists = True;
- struct passwd *pwd;
+ struct passwd *pwd=NULL;
if(lp_security() != SEC_DOMAIN)
return False;