s3: Remove a typedef
authorVolker Lendecke <vl@samba.org>
Tue, 16 Mar 2010 21:08:37 +0000 (22:08 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 16 Mar 2010 21:35:41 +0000 (22:35 +0100)
source3/include/passdb.h
source3/include/proto.h
source3/passdb/login_cache.c
source3/passdb/pdb_ldap.c

index 9be2a697a606ad932ad373a4b527f8ffadf497d5..3ebf72d960b1b53dd9fc768aa563f664b857b199 100644 (file)
@@ -104,12 +104,12 @@ enum pdb_value_state {
 #define IS_SAM_DEFAULT(x, flag)        (pdb_get_init_flags(x, flag) == PDB_DEFAULT)
 
 /* cache for bad password lockout data, to be used on replicated SAMs */
-typedef struct logon_cache_struct {
+struct login_cache {
        time_t entry_timestamp;
        uint32 acct_ctrl;
        uint16 bad_password_count;
        time_t bad_password_time;
-} LOGIN_CACHE;
+};
 
 #define SAMU_BUFFER_V0         0
 #define SAMU_BUFFER_V1         1
index 6e210de4582dd270d9546515974c5b53be25bd21..f2ba8e3b24a6aa1a064f754715b4b9e0f87fdcd6 100644 (file)
@@ -4409,8 +4409,8 @@ char* get_string_param( const char* param );
 
 bool login_cache_init(void);
 bool login_cache_shutdown(void);
-LOGIN_CACHE * login_cache_read(struct samu *sampass);
-bool login_cache_write(const struct samu *sampass, LOGIN_CACHE entry);
+struct login_cache * login_cache_read(struct samu *sampass);
+bool login_cache_write(const struct samu *sampass, struct login_cache entry);
 bool login_cache_delentry(const struct samu *sampass);
 
 /* The following definitions come from passdb/lookup_sid.c  */
index 5e7e9a0b508b88e16b964fa7cdaf829b6689e50f..6ac6d52a63810d6748894116367d00226f087a33 100644 (file)
@@ -63,11 +63,11 @@ bool login_cache_shutdown(void)
 }
 
 /* if we can't read the cache, oh well, no need to return anything */
-LOGIN_CACHE * login_cache_read(struct samu *sampass)
+struct login_cache * login_cache_read(struct samu *sampass)
 {
        char *keystr;
        TDB_DATA databuf;
-       LOGIN_CACHE *entry;
+       struct login_cache *entry;
        uint32_t entry_timestamp = 0, bad_password_time = 0;
 
        if (!login_cache_init())
@@ -88,7 +88,8 @@ LOGIN_CACHE * login_cache_read(struct samu *sampass)
        databuf = tdb_fetch_bystring(cache, keystr);
        SAFE_FREE(keystr);
 
-       if (!(entry = SMB_MALLOC_P(LOGIN_CACHE))) {
+       entry = SMB_MALLOC_P(struct login_cache);
+       if (entry == NULL) {
                DEBUG(1, ("Unable to allocate cache entry buffer!\n"));
                SAFE_FREE(databuf.dptr);
                return NULL;
@@ -118,7 +119,7 @@ LOGIN_CACHE * login_cache_read(struct samu *sampass)
        return entry;
 }
 
-bool login_cache_write(const struct samu *sampass, LOGIN_CACHE entry)
+bool login_cache_write(const struct samu *sampass, struct login_cache entry)
 {
        char *keystr;
        TDB_DATA databuf;
index d079262ee8c6465e5544d2d8a27741296f08d95d..1e3413e3817101ca9cb55afee793f3ac722783cc 100644 (file)
@@ -540,7 +540,7 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
        uint32 hours_len;
        uint8           hours[MAX_HOURS_LEN];
        char *temp = NULL;
-       LOGIN_CACHE     *cache_entry = NULL;
+       struct login_cache *cache_entry = NULL;
        uint32          pwHistLen;
        bool expand_explicit = lp_passdb_expand_explicit();
        bool ret = false;
@@ -1511,7 +1511,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
                        DEBUG(7, ("bad password count is reset, deleting login cache entry for %s\n", pdb_get_nt_username(sampass)));
                        login_cache_delentry(sampass);
                } else {
-                       LOGIN_CACHE cache_entry;
+                       struct login_cache cache_entry;
 
                        cache_entry.entry_timestamp = time(NULL);
                        cache_entry.acct_ctrl = pdb_get_acct_ctrl(sampass);