oops - got some of the default (conversion) functions wrong.
authorLuke Leighton <lkcl@samba.org>
Tue, 19 May 1998 19:41:22 +0000 (19:41 +0000)
committerLuke Leighton <lkcl@samba.org>
Tue, 19 May 1998 19:41:22 +0000 (19:41 +0000)
source/include/proto.h
source/passdb/smbpass.c

index 9256520efe280ddfa823dc642c8f3ed3cad69b89..760f889dd954f56e578ddada4a1d1121f7a25acf 100644 (file)
@@ -1822,9 +1822,6 @@ char *smb_errstr(char *inbuf);
 
 /*The following definitions come from  smbpass.c  */
 
-struct smb_passwd *getsmbfilepwent(void *vp);
-BOOL mod_smbfile21pwd_entry(struct sam_passwd* pwd, BOOL override);
-BOOL mod_smbfilepwd_entry(struct smb_passwd* pwd, BOOL override);
 struct passdb_ops *file_initialize_password_db(void);
 
 /*The following definitions come from  smbpassfile.c  */
index d03a5eb75de00e3de71190b202ddd9e9398bf8f2..a8eea9a563be9c30a173a216ede5caec40e0d236 100644 (file)
@@ -182,7 +182,7 @@ static struct sam_passwd *getsmbfile21pwent(void *vp)
  Routine to return the next entry in the smbpasswd list.
  *************************************************************************/
 
-struct smb_passwd *getsmbfilepwent(void *vp)
+static struct smb_passwd *getsmbfilepwent(void *vp)
 {
   /* Static buffers we will return. */
   static struct smb_passwd pw_buf;
@@ -423,15 +423,6 @@ static BOOL setsmbfilepwpos(void *vp, unsigned long tok)
  Routine to add an entry to the smbpasswd file.
 *************************************************************************/
 
-static BOOL add_smbfile21pwd_entry(struct sam_passwd *newpwd)
-{
-       return False;
-}
-
-/************************************************************************
- Routine to add an entry to the smbpasswd file.
-*************************************************************************/
-
 static BOOL add_smbfilepwd_entry(struct smb_passwd *newpwd)
 {
   char *pfile = lp_smb_passwd_file();
@@ -564,21 +555,7 @@ Error was %s. Password file may be corrupt ! Please examine by hand !\n",
  override = True, override XXXXXXXX'd out password or NO PASS
 ************************************************************************/
 
-BOOL mod_smbfile21pwd_entry(struct sam_passwd* pwd, BOOL override)
-{
-       return False;
-}
-
-/************************************************************************
- Routine to search the smbpasswd file for an entry matching the username.
- and then modify its password entry. We can't use the startsmbpwent()/
- getsmbpwent()/endsmbpwent() interfaces here as we depend on looking
- in the actual file to decide how much room we have to write data.
- override = False, normal
- override = True, override XXXXXXXX'd out password or NO PASS
-************************************************************************/
-
-BOOL mod_smbfilepwd_entry(struct smb_passwd* pwd, BOOL override)
+static BOOL mod_smbfilepwd_entry(struct smb_passwd* pwd, BOOL override)
 {
   /* Static buffers we will return. */
   static pstring  user_name;
@@ -920,19 +897,29 @@ BOOL mod_smbfilepwd_entry(struct smb_passwd* pwd, BOOL override)
   return True;
 }
 
+static BOOL mod_smbfile21pwd_entry(struct sam_passwd* pwd, BOOL override)
+{
+       return mod_smbfilepwd_entry(pdb_sam_to_smb(pwd), override);
+}
+
+static BOOL add_smbfile21pwd_entry(struct sam_passwd *newpwd)
+{
+       return add_smbfilepwd_entry(pdb_sam_to_smb(newpwd));
+}
+
 static struct sam_disp_info *getsmbfiledispnam(char *name)
 {
-       return pdb_sam_to_dispinfo(pdb_ops->getsmbfile21pwnam(name));
+       return pdb_sam_to_dispinfo(getsam21pwnam(name));
 }
 
 static struct sam_disp_info *getsmbfiledisprid(uint32 rid)
 {
-       return pdb_sam_to_dispinfo(pdb_ops->getsmbfile21pwrid(rid));
+       return pdb_sam_to_dispinfo(getsam21pwrid(rid));
 }
 
 static struct sam_disp_info *getsmbfiledispent(void *vp)
 {
-       return pdb_sam_to_dispinfo(pdb_ops->getsmbfile21pwent(vp));
+       return pdb_sam_to_dispinfo(getsam21pwent(vp));
 }
 
 static struct passdb_ops file_ops = {
@@ -946,11 +933,11 @@ static struct passdb_ops file_ops = {
   add_smbfilepwd_entry,
   mod_smbfilepwd_entry,
   getsmbfile21pwent,
-  iterate_getsam21pwnam,        /* In passdb.c */
-  iterate_getsam21pwuid,        /* In passdb.c */
-  iterate_getsam21pwrid,        /* In passdb.c */
+  iterate_getsam21pwnam,
+  iterate_getsam21pwuid,
+  iterate_getsam21pwrid, 
   add_smbfile21pwd_entry,
-  mod_smbfile21pwd_entry
+  mod_smbfile21pwd_entry,
   getsmbfiledispnam,
   getsmbfiledisprid,
   getsmbfiledispent