diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/conn.c | 3 | ||||
-rw-r--r-- | source3/smbd/uid.c | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c index bc5a03b4eb..1d4444f368 100644 --- a/source3/smbd/conn.c +++ b/source3/smbd/conn.c @@ -63,6 +63,7 @@ connection_struct *conn_new(struct smbd_server_connection *sconn) if (!(conn=talloc_zero(NULL, connection_struct)) || !(conn->params = talloc(conn, struct share_params)) || + !(conn->vuid_cache = talloc_zero(conn, struct vuid_cache)) || !(conn->connectpath = talloc_strdup(conn, "")) || !(conn->origpath = talloc_strdup(conn, ""))) { DEBUG(0,("TALLOC_ZERO() failed!\n")); @@ -89,7 +90,7 @@ static void conn_clear_vuid_cache(connection_struct *conn, uint64_t vuid) for (i=0; i<VUID_CACHE_SIZE; i++) { struct vuid_cache_entry *ent; - ent = &conn->vuid_cache.array[i]; + ent = &conn->vuid_cache->array[i]; if (ent->vuid == vuid) { ent->vuid = UID_FIELD_INVALID; diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 9244f2997d..f9b5716f3d 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -68,7 +68,7 @@ static void free_conn_session_info_if_unused(connection_struct *conn) for (i = 0; i < VUID_CACHE_SIZE; i++) { struct vuid_cache_entry *ent; - ent = &conn->vuid_cache.array[i]; + ent = &conn->vuid_cache->array[i]; if (ent->vuid != UID_FIELD_INVALID && conn->session_info == ent->session_info) { return; @@ -96,7 +96,7 @@ static bool check_user_ok(connection_struct *conn, struct vuid_cache_entry *ent = NULL; for (i=0; i<VUID_CACHE_SIZE; i++) { - ent = &conn->vuid_cache.array[i]; + ent = &conn->vuid_cache->array[i]; if (ent->vuid == vuid) { free_conn_session_info_if_unused(conn); conn->session_info = ent->session_info; @@ -141,10 +141,10 @@ static bool check_user_ok(connection_struct *conn, session_info->info->domain_name, NULL, session_info->security_token, lp_admin_users(snum)); - ent = &conn->vuid_cache.array[conn->vuid_cache.next_entry]; + ent = &conn->vuid_cache->array[conn->vuid_cache->next_entry]; - conn->vuid_cache.next_entry = - (conn->vuid_cache.next_entry + 1) % VUID_CACHE_SIZE; + conn->vuid_cache->next_entry = + (conn->vuid_cache->next_entry + 1) % VUID_CACHE_SIZE; TALLOC_FREE(ent->session_info); |