Lines Matching refs:user
15 struct ksmbd_user *user = NULL; in ksmbd_login_user() local
24 user = ksmbd_alloc_user(resp); in ksmbd_login_user()
27 return user; in ksmbd_login_user()
32 struct ksmbd_user *user = NULL; in ksmbd_alloc_user() local
34 user = kmalloc(sizeof(struct ksmbd_user), GFP_KERNEL); in ksmbd_alloc_user()
35 if (!user) in ksmbd_alloc_user()
38 user->name = kstrdup(resp->account, GFP_KERNEL); in ksmbd_alloc_user()
39 user->flags = resp->status; in ksmbd_alloc_user()
40 user->gid = resp->gid; in ksmbd_alloc_user()
41 user->uid = resp->uid; in ksmbd_alloc_user()
42 user->passkey_sz = resp->hash_sz; in ksmbd_alloc_user()
43 user->passkey = kmalloc(resp->hash_sz, GFP_KERNEL); in ksmbd_alloc_user()
44 if (user->passkey) in ksmbd_alloc_user()
45 memcpy(user->passkey, resp->hash, resp->hash_sz); in ksmbd_alloc_user()
47 if (!user->name || !user->passkey) { in ksmbd_alloc_user()
48 kfree(user->name); in ksmbd_alloc_user()
49 kfree(user->passkey); in ksmbd_alloc_user()
50 kfree(user); in ksmbd_alloc_user()
51 user = NULL; in ksmbd_alloc_user()
53 return user; in ksmbd_alloc_user()
56 void ksmbd_free_user(struct ksmbd_user *user) in ksmbd_free_user() argument
58 ksmbd_ipc_logout_request(user->name, user->flags); in ksmbd_free_user()
59 kfree(user->name); in ksmbd_free_user()
60 kfree(user->passkey); in ksmbd_free_user()
61 kfree(user); in ksmbd_free_user()
64 int ksmbd_anonymous_user(struct ksmbd_user *user) in ksmbd_anonymous_user() argument
66 if (user->name[0] == '\0') in ksmbd_anonymous_user()