1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2018 Samsung Electronics Co., Ltd.
6 #ifndef __USER_CONFIG_MANAGEMENT_H__
7 #define __USER_CONFIG_MANAGEMENT_H__
23 static inline bool user_guest(struct ksmbd_user *user)
25 return user->flags & KSMBD_USER_FLAG_GUEST_ACCOUNT;
28 static inline void set_user_flag(struct ksmbd_user *user, int flag)
33 static inline int test_user_flag(struct ksmbd_user *user, int flag)
35 return user->flags & flag;
38 static inline void set_user_guest(struct ksmbd_user *user)
42 static inline char *user_passkey(struct ksmbd_user *user)
47 static inline char *user_name(struct ksmbd_user *user)
52 static inline unsigned int user_uid(struct ksmbd_user *user)
57 static inline unsigned int user_gid(struct ksmbd_user *user)
62 struct ksmbd_user *ksmbd_login_user(const char *account);
63 struct ksmbd_user *ksmbd_alloc_user(struct ksmbd_login_response *resp);
64 void ksmbd_free_user(struct ksmbd_user *user);
65 int ksmbd_anonymous_user(struct ksmbd_user *user);
66 #endif /* __USER_CONFIG_MANAGEMENT_H__ */