]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
passdb: Fix whitespace
authorVolker Lendecke <vl@samba.org>
Tue, 24 Jan 2023 09:16:41 +0000 (10:16 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 14 Aug 2023 19:53:37 +0000 (19:53 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/passdb/pdb_interface.c
source3/passdb/pdb_smbpasswd.c
source3/passdb/pdb_tdb.c

index 14d7c2aec5fcd2547611ce473738f5ed2516940d..cee90d9ff79274cdd775623261e9a3a007389cc8 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    Unix SMB/CIFS implementation.
    Password and authentication handling
    Copyright (C) Andrew Bartlett                       2002
@@ -62,14 +62,14 @@ static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32_t rid,
                                  enum lsa_SidType *psid_name_use,
                                  uid_t *uid, gid_t *gid);
 
-NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init) 
+NTSTATUS smb_register_passdb(int version, const char *name, pdb_init_function init)
 {
        struct pdb_init_function_entry *entry = NULL;
 
        if(version != PASSDB_INTERFACE_VERSION) {
                DEBUG(0,("Can't register passdb backend!\n"
                         "You tried to register a passdb module with PASSDB_INTERFACE_VERSION %d, "
-                        "while this version of samba uses version %d\n", 
+                        "while this version of samba uses version %d\n",
                         version,PASSDB_INTERFACE_VERSION));
                return NT_STATUS_OBJECT_TYPE_MISMATCH;
        }
@@ -159,7 +159,7 @@ NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected
        entry = pdb_find_backend_entry(module_name);
 
        /* Try to find a module that contains this module */
-       if (!entry) { 
+       if (!entry) {
                DEBUG(2,("No builtin backend found, trying to load plugin\n"));
                if(NT_STATUS_IS_OK(smb_probe_module("pdb", module_name)) && !(entry = pdb_find_backend_entry(module_name))) {
                        DEBUG(0,("Plugin is available, but doesn't register passdb backend %s\n", module_name));
@@ -169,7 +169,7 @@ NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected
        }
 
        /* No such backend found */
-       if(!entry) { 
+       if(!entry) {
                DEBUG(0,("No builtin nor plugin backend for %s found\n", module_name));
                SAFE_FREE(module_name);
                return NT_STATUS_INVALID_PARAMETER;
@@ -179,7 +179,7 @@ NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected
 
        nt_status = entry->init(methods, module_location);
        if (!NT_STATUS_IS_OK(nt_status)) {
-               DEBUG(0,("pdb backend %s did not correctly init (error was %s)\n", 
+               DEBUG(0,("pdb backend %s did not correctly init (error was %s)\n",
                        selected, nt_errstr(nt_status)));
                SAFE_FREE(module_name);
                return nt_status;
@@ -196,7 +196,7 @@ NTSTATUS make_pdb_method_name(struct pdb_methods **methods, const char *selected
  Return an already initialized pdb_methods structure
 *******************************************************************/
 
-static struct pdb_methods *pdb_get_methods_reload( bool reload ) 
+static struct pdb_methods *pdb_get_methods_reload( bool reload )
 {
        static struct pdb_methods *pdb = NULL;
        const char *backend = lp_passdb_backend();
@@ -329,7 +329,7 @@ static bool pdb_try_account_unlock(struct samu *sampass)
  *
  * @return               True on success, false on error.
  */
-bool pdb_getsampwnam(struct samu *sam_acct, const char *username) 
+bool pdb_getsampwnam(struct samu *sam_acct, const char *username)
 {
        struct pdb_methods *pdb = pdb_get_methods();
        struct samu *for_cache;
@@ -378,7 +378,7 @@ static bool guest_user_info( struct samu *user )
 
        pwd = Get_Pwnam_alloc(talloc_tos(), guestname);
        if (pwd == NULL) {
-               DEBUG(0,("guest_user_info: Unable to locate guest account [%s]!\n", 
+               DEBUG(0,("guest_user_info: Unable to locate guest account [%s]!\n",
                        guestname));
                return False;
        }
@@ -479,7 +479,7 @@ static NTSTATUS pdb_default_create_user(struct pdb_methods *methods,
                        return NT_STATUS_NO_SUCH_USER;
                }
 
-               /* lowercase the username before creating the Unix account for 
+               /* lowercase the username before creating the Unix account for
                   compatibility with previous Samba releases */
                fstrcpy( name2, name );
                if (!strlower_m( name2 )) {
@@ -608,7 +608,7 @@ static NTSTATUS pdb_default_delete_user(struct pdb_methods *methods,
         * the unix side
         */
 
-       /* always lower case the username before handing it off to 
+       /* always lower case the username before handing it off to
           external scripts */
 
        fstrcpy( username, pdb_get_username(sam_acct) );
@@ -666,13 +666,13 @@ NTSTATUS pdb_delete_user(TALLOC_CTX *mem_ctx, struct samu *sam_acct)
        return status;
 }
 
-NTSTATUS pdb_add_sam_account(struct samu *sam_acct) 
+NTSTATUS pdb_add_sam_account(struct samu *sam_acct)
 {
        struct pdb_methods *pdb = pdb_get_methods();
        return pdb->add_sam_account(pdb, sam_acct);
 }
 
-NTSTATUS pdb_update_sam_account(struct samu *sam_acct) 
+NTSTATUS pdb_update_sam_account(struct samu *sam_acct)
 {
        struct pdb_methods *pdb = pdb_get_methods();
 
@@ -681,7 +681,7 @@ NTSTATUS pdb_update_sam_account(struct samu *sam_acct)
        return pdb->update_sam_account(pdb, sam_acct);
 }
 
-NTSTATUS pdb_delete_sam_account(struct samu *sam_acct) 
+NTSTATUS pdb_delete_sam_account(struct samu *sam_acct)
 {
        struct pdb_methods *pdb = pdb_get_methods();
        const struct dom_sid *user_sid = pdb_get_user_sid(sam_acct);
@@ -894,7 +894,7 @@ NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
        struct pdb_methods *pdb = pdb_get_methods();
        NTSTATUS result;
 
-       result = pdb->enum_group_members(pdb, mem_ctx, 
+       result = pdb->enum_group_members(pdb, mem_ctx,
                        sid, pp_member_rids, p_num_members);
 
        /* special check for rid 513 */
@@ -1029,7 +1029,7 @@ static NTSTATUS pdb_default_add_groupmem(struct pdb_methods *methods,
                return NT_STATUS_MEMBER_IN_GROUP;
        }
 
-       /* 
+       /*
         * ok, the group exist, the user exist, the user is not in the group,
         * we can (finally) add it to the group !
         */
@@ -1098,7 +1098,7 @@ static NTSTATUS pdb_default_del_groupmem(struct pdb_methods *methods,
                return NT_STATUS_MEMBER_NOT_IN_GROUP;
        }
 
-       /* 
+       /*
         * ok, the group exist, the user exist, the user is in the group,
         * we can (finally) delete it from the group!
         */
@@ -1196,7 +1196,7 @@ bool pdb_get_account_policy(enum pdb_policy_type type, uint32_t *value)
        status = pdb->get_account_policy(pdb, type, value);
        unbecome_root();
 
-       return NT_STATUS_IS_OK(status); 
+       return NT_STATUS_IS_OK(status);
 }
 
 bool pdb_set_account_policy(enum pdb_policy_type type, uint32_t value)
@@ -1217,13 +1217,13 @@ bool pdb_get_seq_num(time_t *seq_num)
        return NT_STATUS_IS_OK(pdb->get_seq_num(pdb, seq_num));
 }
 
-/* 
+/*
  * Instead of passing down a gid or uid, this function sends down a pointer
- * to a unixid. 
+ * to a unixid.
  *
  * This acts as an in-out variable so that the idmap functions can correctly
  * receive ID_TYPE_BOTH, filling in cache details correctly rather than forcing
- * the cache to store ID_TYPE_UID or ID_TYPE_GID. 
+ * the cache to store ID_TYPE_UID or ID_TYPE_GID.
  */
 bool pdb_id_to_sid(struct unixid *id, struct dom_sid *sid)
 {
@@ -1300,7 +1300,7 @@ bool pdb_new_rid(uint32_t *rid)
                return False;
        }
 
-       /* Attempt to get an unused RID (max tires is 250...yes that it is 
+       /* Attempt to get an unused RID (max tires is 250...yes that it is
           and arbitrary number I pulkled out of my head).   -- jerry */
 
        for ( i=0; allocated_rid==0 && i<250; i++ ) {
@@ -1330,7 +1330,7 @@ bool pdb_new_rid(uint32_t *rid)
 }
 
 /***************************************************************
-  Initialize the static context (at smbd startup etc). 
+  Initialize the static context (at smbd startup etc).
 
   If uninitialised, context will auto-init on first use.
  ***************************************************************/
@@ -1619,7 +1619,7 @@ static bool get_memberuids(TALLOC_CTX *mem_ctx, gid_t gid, uid_t **pp_uids, uint
        struct passwd *pwd;
        bool winbind_env;
        bool ret = False;
+
        *pp_uids = NULL;
        *p_num = 0;
 
@@ -1844,7 +1844,7 @@ static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32_t rid,
 
        TALLOC_FREE(map);
 
-       /* Windows will always map RID 513 to something.  On a non-domain 
+       /* Windows will always map RID 513 to something.  On a non-domain
           controller, this gets mapped to SERVER\None. */
 
        if (uid || gid) {
@@ -2030,7 +2030,7 @@ static bool pdb_search_grouptype(struct pdb_methods *methods,
                return False;
        }
 
-       if (!NT_STATUS_IS_OK(methods->enum_group_mapping(methods, sid, type, 
+       if (!NT_STATUS_IS_OK(methods->enum_group_mapping(methods, sid, type,
                                                         &state->groups, &state->num_groups,
                                                         True))) {
                DEBUG(0, ("Could not enum groups\n"));
@@ -2168,7 +2168,7 @@ bool pdb_get_trusteddom_pw(const char *domain, char** pwd, struct dom_sid *sid,
                           time_t *pass_last_set_time)
 {
        struct pdb_methods *pdb = pdb_get_methods();
-       return pdb->get_trusteddom_pw(pdb, domain, pwd, sid, 
+       return pdb->get_trusteddom_pw(pdb, domain, pwd, sid,
                        pass_last_set_time);
 }
 
@@ -2200,14 +2200,14 @@ NTSTATUS pdb_enum_trusteddoms(TALLOC_CTX *mem_ctx, uint32_t *num_domains,
 }
 
 /*******************************************************************
- the defaults for trustdom methods: 
+ the defaults for trustdom methods:
  these simply call the original passdb/secrets.c actions,
  to be replaced by pdb_ldap.
  *******************************************************************/
 
 static bool pdb_default_get_trusteddom_pw(struct pdb_methods *methods,
-                                         const char *domain, 
-                                         char** pwd, 
+                                         const char *domain,
+                                         char** pwd,
                                          struct dom_sid *sid,
                                          time_t *pass_last_set_time)
 {
@@ -2225,22 +2225,22 @@ static NTSTATUS pdb_default_get_trusteddom_creds(struct pdb_methods *methods,
        return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static bool pdb_default_set_trusteddom_pw(struct pdb_methods *methods, 
-                                         const char* domain, 
+static bool pdb_default_set_trusteddom_pw(struct pdb_methods *methods,
+                                         const char* domain,
                                          const char* pwd,
                                          const struct dom_sid *sid)
 {
        return secrets_store_trusted_domain_password(domain, pwd, sid);
 }
 
-static bool pdb_default_del_trusteddom_pw(struct pdb_methods *methods, 
+static bool pdb_default_del_trusteddom_pw(struct pdb_methods *methods,
                                          const char *domain)
 {
        return trusted_domain_password_delete(domain);
 }
 
 static NTSTATUS pdb_default_enum_trusteddoms(struct pdb_methods *methods,
-                                            TALLOC_CTX *mem_ctx, 
+                                            TALLOC_CTX *mem_ctx,
                                             uint32_t *num_domains,
                                             struct trustdom_info ***domains)
 {
@@ -2617,11 +2617,11 @@ static NTSTATUS pdb_default_delete_secret(struct pdb_methods *methods,
 /*******************************************************************
  Create a pdb_methods structure and initialize it with the default
  operations.  In this way a passdb module can simply implement
- the functionality it cares about.  However, normally this is done 
+ the functionality it cares about.  However, normally this is done
  in groups of related functions.
 *******************************************************************/
 
-NTSTATUS make_pdb_method( struct pdb_methods **methods ) 
+NTSTATUS make_pdb_method( struct pdb_methods **methods )
 {
        /* allocate memory for the structure as its own talloc CTX */
 
index c7aa4dbb18e1d94cac1662c895cdc2419fb40aa9..04cf419d89053bf66a85262c7b81ceff39fb44f6 100644 (file)
@@ -1,21 +1,21 @@
 /*
- * Unix SMB/CIFS implementation. 
+ * Unix SMB/CIFS implementation.
  * SMB parameters and setup
- * Copyright (C) Andrew Tridgell       1992-1998 
+ * Copyright (C) Andrew Tridgell       1992-1998
  * Modified by Jeremy Allison          1995.
  * Modified by Gerald (Jerry) Carter   2000-2001,2003
  * Modified by Andrew Bartlett         2002.
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free
  * Software Foundation; either version 3 of the License, or (at your option)
  * any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License along with
  * this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_PASSDB
 
-/* 
+/*
    smb_passwd is analogous to sam_passwd used everywhere
    else.  However, smb_passwd is limited to the information
-   stored by an smbpasswd entry 
+   stored by an smbpasswd entry
  */
 
 struct smb_passwd
@@ -82,7 +82,7 @@ static void gotalarm_sig(int signum)
 }
 
 /***************************************************************
- Lock or unlock a fd for a known lock type. Abandon after waitsecs 
+ Lock or unlock a fd for a known lock type. Abandon after waitsecs
  seconds.
 ****************************************************************/
 
@@ -172,7 +172,7 @@ static bool pw_file_unlock(int fd, int *plock_depth)
 
 static void pdb_init_smb(struct smb_passwd *user)
 {
-       if (user == NULL) 
+       if (user == NULL)
                return;
        ZERO_STRUCTP (user);
 
@@ -379,7 +379,7 @@ static struct smb_passwd *getsmbfilepwent(struct smbpasswd_privates *smbpasswd_s
        }
 
        pdb_init_smb(pw_buf);
-       pw_buf->acct_ctrl = ACB_NORMAL;  
+       pw_buf->acct_ctrl = ACB_NORMAL;
 
        /*
         * Scan the file, a line at a time and check if the name matches.
@@ -423,10 +423,10 @@ static struct smb_passwd *getsmbfilepwent(struct smbpasswd_privates *smbpasswd_s
 
                /*
                 * The line we have should be of the form :-
-                * 
+                *
                 * username:uid:32hex bytes:[Account type]:LCT-12345678....other flags presently
                 * ignored....
-                * 
+                *
                 * or,
                 *
                 * username:uid:32hex bytes:32hex bytes:[Account type]:LCT-12345678....ignored....
@@ -517,7 +517,7 @@ static struct smb_passwd *getsmbfilepwent(struct smbpasswd_privates *smbpasswd_s
                        }
                }
 
-               /* 
+               /*
                 * Now check if the NT compatible password is
                 * available.
                 */
@@ -560,7 +560,7 @@ static struct smb_passwd *getsmbfilepwent(struct smbpasswd_privates *smbpasswd_s
                                        }
                                        if(i == 8) {
                                                /*
-                                                * p points at 8 characters of hex digits - 
+                                                * p points at 8 characters of hex digits -
                                                 * read into a time_t as the seconds since
                                                 * 1970 that the password was last changed.
                                                 */
@@ -598,7 +598,7 @@ static char *format_new_smbpasswd_entry(const struct smb_passwd *newpwd)
        char *new_entry;
        char *p;
 
-       new_entry_length = strlen(newpwd->smb_name) + 1 + 15 + 1 + 32 + 1 + 32 + 1 + 
+       new_entry_length = strlen(newpwd->smb_name) + 1 + 15 + 1 + 32 + 1 + 32 + 1 +
                                NEW_PW_FORMAT_SPACE_PADDED_LEN + 1 + 13 + 2;
 
        if((new_entry = (char *)SMB_MALLOC( new_entry_length )) == NULL) {
@@ -643,7 +643,7 @@ static NTSTATUS add_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state,
        size_t new_entry_length;
        char *new_entry;
        off_t offpos;
+
        /* Open the smbpassword file - for update. */
        fp = startsmbfilepwent(pfile, PWF_UPDATE, &smbpasswd_state->pw_file_lock_depth);
 
@@ -672,8 +672,8 @@ static NTSTATUS add_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state,
        /* Ok - entry doesn't exist. We can add it */
 
        /* Create a new smb passwd entry and set it to the given password. */
-       /* 
-        * The add user write needs to be atomic - so get the fd from 
+       /*
+        * The add user write needs to be atomic - so get the fd from
         * the fp and do a raw write() call.
         */
        fd = fileno(fp);
@@ -696,7 +696,7 @@ Error was %s\n", newpwd->smb_name, pfile, strerror(errno)));
        new_entry_length = strlen(new_entry);
 
 #ifdef DEBUG_PASSWORD
-       DEBUG(100, ("add_smbfilepwd_entry(%d): new_entry_len %d made line |%s|", 
+       DEBUG(100, ("add_smbfilepwd_entry(%d): new_entry_len %d made line |%s|",
                        fd, (int)new_entry_length, new_entry));
 #endif
 
@@ -708,7 +708,7 @@ Error was %s\n", wr_len, newpwd->smb_name, pfile, strerror(errno)));
                /* Remove the entry we just wrote. */
                if(ftruncate(fd, offpos) == -1) {
                        DEBUG(0, ("add_smbfilepwd_entry: ERROR failed to ftruncate file %s. \
-Error was %s. Password file may be corrupt ! Please examine by hand !\n", 
+Error was %s. Password file may be corrupt ! Please examine by hand !\n",
                                newpwd->smb_name, strerror(errno)));
                }
 
@@ -827,10 +827,10 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, con
 
                /*
                 * The line we have should be of the form :-
-                * 
+                *
                 * username:uid:[32hex bytes]:....other flags presently
                 * ignored....
-                * 
+                *
                 * or,
                 *
                 * username:uid:[32hex bytes]:[32hex bytes]:[attributes]:LCT-XXXXXXXX:...ignored.
@@ -935,7 +935,7 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, con
                return False;
        }
 
-       /* 
+       /*
         * Now check if the account info and the password last
         * change time is available.
         */
@@ -1009,9 +1009,9 @@ This is no longer supported.!\n", pwd->smb_name));
 
        /* Add on the account info bits and the time of last password change. */
        if(got_pass_last_set_time) {
-               slprintf(&ascii_p16[strlen(ascii_p16)], 
+               slprintf(&ascii_p16[strlen(ascii_p16)],
                        sizeof(ascii_p16)-(strlen(ascii_p16)+1),
-                       "%s:LCT-%08X:", 
+                       "%s:LCT-%08X:",
                        encode_bits, (uint32_t)pwd->pass_last_set_time );
                wr_len = strlen(ascii_p16);
        }
@@ -1033,7 +1033,7 @@ This is no longer supported.!\n", pwd->smb_name));
         * seekpos.
         */
 
-       /* The mod user write needs to be atomic - so get the fd from 
+       /* The mod user write needs to be atomic - so get the fd from
                the fp and do a raw write() call.
         */
 
@@ -1060,7 +1060,7 @@ This is no longer supported.!\n", pwd->smb_name));
                fclose(fp);
                return False;
        }
+
        if (lseek(fd, pwd_seekpos, SEEK_SET) != pwd_seekpos) {
                DEBUG(0, ("mod_smbfilepwd_entry: seek fail on file %s.\n", pfile));
                pw_file_unlock(lockfd,&smbpasswd_state->pw_file_lock_depth);
@@ -1196,7 +1196,7 @@ static bool build_smb_pass (struct smb_passwd *smb_pw, const struct samu *sampas
 {
        uint32_t rid;
 
-       if (sampass == NULL) 
+       if (sampass == NULL)
                return False;
        ZERO_STRUCTP(smb_pw);
 
@@ -1229,13 +1229,13 @@ static bool build_smb_pass (struct smb_passwd *smb_pw, const struct samu *sampas
        smb_pw->pass_last_set_time=pdb_get_pass_last_set_time(sampass);
 
        return True;
-}      
+}
 
 /*********************************************************************
  Create a struct samu from a smb_passwd struct
  ********************************************************************/
 
-static bool build_sam_account(struct smbpasswd_privates *smbpasswd_state, 
+static bool build_sam_account(struct smbpasswd_privates *smbpasswd_state,
                              struct samu *sam_pass, const struct smb_passwd *pw_buf)
 {
        struct passwd *pwfile;
@@ -1272,7 +1272,7 @@ static bool build_sam_account(struct smbpasswd_privates *smbpasswd_state,
 }
 
 /*****************************************************************
- Functions to be implemented by the new passdb API 
+ Functions to be implemented by the new passdb API
  ****************************************************************/
 
 /****************************************************************
@@ -1281,7 +1281,7 @@ static bool build_sam_account(struct smbpasswd_privates *smbpasswd_state,
  the correct entry
  ***************************************************************/
 
-static NTSTATUS smbpasswd_getsampwnam(struct pdb_methods *my_methods, 
+static NTSTATUS smbpasswd_getsampwnam(struct pdb_methods *my_methods,
                                  struct samu *sam_acct, const char *username)
 {
        NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
@@ -1441,7 +1441,7 @@ static NTSTATUS smbpasswd_delete_sam_account (struct pdb_methods *my_methods, st
        return NT_STATUS_UNSUCCESSFUL;
 }
 
-static NTSTATUS smbpasswd_rename_sam_account (struct pdb_methods *my_methods, 
+static NTSTATUS smbpasswd_rename_sam_account (struct pdb_methods *my_methods,
                                              struct samu *old_acct,
                                              const char *newname)
 {
@@ -1460,8 +1460,8 @@ static NTSTATUS smbpasswd_rename_sam_account (struct pdb_methods *my_methods,
                return NT_STATUS_NO_MEMORY;
        }
 
-       if ( !pdb_copy_sam_account( new_acct, old_acct ) 
-               || !pdb_set_username(new_acct, newname, PDB_CHANGED)) 
+       if ( !pdb_copy_sam_account( new_acct, old_acct )
+               || !pdb_set_username(new_acct, newname, PDB_CHANGED))
        {
                goto done;
        }
@@ -1530,7 +1530,7 @@ done:
        if (new_acct)
                TALLOC_FREE(new_acct);
 
-       return (ret);   
+       return (ret);
 }
 
 static uint32_t smbpasswd_capabilities(struct pdb_methods *methods)
@@ -1538,7 +1538,7 @@ static uint32_t smbpasswd_capabilities(struct pdb_methods *methods)
        return 0;
 }
 
-static void free_private_data(void **vp) 
+static void free_private_data(void **vp)
 {
        struct smbpasswd_privates **privates = (struct smbpasswd_privates**)vp;
 
@@ -1724,7 +1724,7 @@ static NTSTATUS pdb_init_smbpasswd( struct pdb_methods **pdb_method, const char
        return NT_STATUS_OK;
 }
 
-NTSTATUS pdb_smbpasswd_init(TALLOC_CTX *ctx) 
+NTSTATUS pdb_smbpasswd_init(TALLOC_CTX *ctx)
 {
        return smb_register_passdb(PASSDB_INTERFACE_VERSION, "smbpasswd", pdb_init_smbpasswd);
 }
index fb64af4a0b8e5978047b43409ec2b76485b547f0..493a4e9411e32d595dda0d8c917814dfe09b3ecb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Unix SMB/CIFS implementation. 
+ * Unix SMB/CIFS implementation.
  * SMB parameters and setup
  * Copyright (C) Andrew Tridgell   1992-1998
  * Copyright (C) Simo Sorce        2000-2003
@@ -7,17 +7,17 @@
  * Copyright (C) Jeremy Allison    2001-2009
  * Copyright (C) Andrew Bartlett   2002
  * Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2005
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free
  * Software Foundation; either version 3 of the License, or (at your option)
  * any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  * more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License along with
  * this program; if not, see <http://www.gnu.org/licenses/>.
  */
@@ -786,7 +786,7 @@ static NTSTATUS tdbsam_delete_sam_account(struct pdb_methods *my_methods,
 
 /***************************************************************************
  Update the TDB SAM account record only
- Assumes that the tdbsam is already open 
+ Assumes that the tdbsam is already open
 ****************************************************************************/
 static bool tdb_update_samacct_only( struct samu* newpwd, int flag )
 {
@@ -929,7 +929,7 @@ static bool tdb_update_sam(struct pdb_methods *my_methods, struct samu* newpwd,
        /* Now take care of the case where the RID changed. We need
         * to delete the old RID key and add the new. */
 
-       if (flag == TDB_MODIFY && newrid != oldrid) { 
+       if (flag == TDB_MODIFY && newrid != oldrid) {
                fstring keystr;
 
                /* Delete old RID key */
@@ -974,7 +974,7 @@ static NTSTATUS tdbsam_update_sam_account (struct pdb_methods *my_methods, struc
 {
        if ( !tdb_update_sam(my_methods, newpwd, TDB_MODIFY) )
                return NT_STATUS_UNSUCCESSFUL;
-       
+
        return NT_STATUS_OK;
 }
 
@@ -986,7 +986,7 @@ static NTSTATUS tdbsam_add_sam_account (struct pdb_methods *my_methods, struct s
 {
        if ( !tdb_update_sam(my_methods, newpwd, TDB_INSERT) )
                return NT_STATUS_UNSUCCESSFUL;
-               
+
        return NT_STATUS_OK;
 }
 
@@ -1114,7 +1114,7 @@ static NTSTATUS tdbsam_rename_sam_account(struct pdb_methods *my_methods,
                 */
                DEBUG(0, ("transaction_commit failed\n"));
                TALLOC_FREE(new_acct);
-               return NT_STATUS_INTERNAL_DB_CORRUPTION;        
+               return NT_STATUS_INTERNAL_DB_CORRUPTION;
        }
 
        TALLOC_FREE(new_acct );
@@ -1127,7 +1127,7 @@ static NTSTATUS tdbsam_rename_sam_account(struct pdb_methods *my_methods,
 
        TALLOC_FREE(new_acct);
 
-       return NT_STATUS_ACCESS_DENIED; 
+       return NT_STATUS_ACCESS_DENIED;
 }
 
 static uint32_t tdbsam_capabilities(struct pdb_methods *methods)