smb_passwd and pam_smbpass fixes [SAMBA_2_2]
Alexander Bokovoy
a.bokovoy at sam-solutions.net
Wed Aug 29 12:45:49 GMT 2001
Here is another patch to fix pam_smbpass compilation problems in SAMBA_2_2 branch.
This patch fixes 'dereference of incomplete pointer' errors in
pam_smbpass/pam_smb_auth.c. The reason for moving declaration of
smb_passwd struct into include/includes.h instead of passdb/pam_smbpasswd.c
is that it is used in both passdb and pam_smbpass modules and thus should
be globally declared in case of USE_SMBPASS_DB definition.
include/includes.h was selected also because there are no other
appropriate include files that are included _after_ USE_SMBPASS_DB
definition.
--
/ Alexander Bokovoy
$ cat /proc/identity >~/.signature
`Senior software developer and analyst for SaM-Solutions Ltd.`
---
"Everyone's head is a cheap movie show."
-- Jeff G. Bone
-------------- next part --------------
diff -urN -k.orig source/include/includes.h.orig source/include/includes.h
--- source/include/includes.h.orig Fri Aug 24 17:27:31 2001
+++ source/include/includes.h Wed Aug 29 15:28:24 2001
@@ -1043,5 +1043,26 @@
#define slprintf snprintf
#define vslprintf vsnprintf
+/* This should be _after_ USE_SMBPASS_DB definition */
+#ifdef USE_SMBPASS_DB
+/*
+ smb_passwd is analogous to sam_passwd used everywhere
+ else. However, smb_passwd is limited to the information
+ stored by an smbpasswd entry
+ */
+
+struct smb_passwd
+{
+ uid_t smb_userid; /* this is actually the unix uid_t */
+ char *smb_name; /* username string */
+
+ unsigned char *smb_passwd; /* Null if no password */
+ unsigned char *smb_nt_passwd; /* Null if no password */
+
+ uint16 acct_ctrl; /* account info (ACB_xxxx bit-mask) */
+ time_t pass_last_set_time; /* password last set time */
+};
+#endif
+
#endif /* _INCLUDES_H */
diff -urN -k.orig source/passdb/pdb_smbpasswd.c.orig source/passdb/pdb_smbpasswd.c
--- source/passdb/pdb_smbpasswd.c.orig Fri Aug 24 17:27:38 2001
+++ source/passdb/pdb_smbpasswd.c Wed Aug 29 15:05:41 2001
@@ -25,25 +25,6 @@
#ifdef USE_SMBPASS_DB
-/*
- smb_passwd is analogous to sam_passwd used everywhere
- else. However, smb_passwd is limited to the information
- stored by an smbpasswd entry
- */
-
-struct smb_passwd
-{
- uid_t smb_userid; /* this is actually the unix uid_t */
- char *smb_name; /* username string */
-
- unsigned char *smb_passwd; /* Null if no password */
- unsigned char *smb_nt_passwd; /* Null if no password */
-
- uint16 acct_ctrl; /* account info (ACB_xxxx bit-mask) */
- time_t pass_last_set_time; /* password last set time */
-};
-
-
extern int DEBUGLEVEL;
extern pstring samlogon_user;
extern BOOL sam_logon_in_ssb;
More information about the samba-technical
mailing list