void become_root(void);
void unbecome_root(void);
-/* The following definitions come from lib/dummysmbd.c */
+/* The following definitions come from lib/smbd_shim.c */
int find_service(TALLOC_CTX *ctx, const char *service_in, char **p_service_out);
void cancel_pending_lock_requests_by_fid(files_struct *fsp,
const char *name);
NTSTATUS can_delete_directory_fsp(files_struct *fsp);
bool change_to_root_user(void);
+bool become_authenticated_pipe_user(struct auth_session_info *session_info);
+bool unbecome_authenticated_pipe_user(void);
+
void contend_level2_oplocks_begin(files_struct *fsp,
enum level2_contention_type type);
void contend_level2_oplocks_end(files_struct *fsp,
return false;
}
+bool become_authenticated_pipe_user(struct auth_session_info *session_info)
+{
+ if (shim.become_authenticated_pipe_user) {
+ return shim.become_authenticated_pipe_user(session_info);
+ }
+
+ return false;
+}
+
+bool unbecome_authenticated_pipe_user(void)
+{
+ if (shim.unbecome_authenticated_pipe_user) {
+ return shim.unbecome_authenticated_pipe_user();
+ }
+
+ return false;
+}
+
/**
* The following two functions need to be called from inside the low-level BRL
* code for oplocks correctness in smbd. Since other utility binaries also
const char *name);
bool (*change_to_root_user)(void);
+ bool (*become_authenticated_pipe_user)(struct auth_session_info *session_info);
+ bool (*unbecome_authenticated_pipe_user)(void);
void (*contend_level2_oplocks_begin)(files_struct *fsp,
enum level2_contention_type type);
bool change_to_user(connection_struct *conn, uint64_t vuid);
bool change_to_root_user(void);
bool smbd_change_to_root_user(void);
-bool become_authenticated_pipe_user(struct auth_session_info *session_info);
-bool unbecome_authenticated_pipe_user(void);
+bool smbd_become_authenticated_pipe_user(struct auth_session_info *session_info);
+bool smbd_unbecome_authenticated_pipe_user(void);
void become_root(void);
void unbecome_root(void);
void smbd_become_root(void);
.cancel_pending_lock_requests_by_fid = smbd_cancel_pending_lock_requests_by_fid,
.send_stat_cache_delete_message = smbd_send_stat_cache_delete_message,
.change_to_root_user = smbd_change_to_root_user,
+ .become_authenticated_pipe_user = smbd_become_authenticated_pipe_user,
+ .unbecome_authenticated_pipe_user = smbd_unbecome_authenticated_pipe_user,
.contend_level2_oplocks_begin = smbd_contend_level2_oplocks_begin,
.contend_level2_oplocks_end = smbd_contend_level2_oplocks_end,
user. Doesn't modify current_user.
****************************************************************************/
-bool become_authenticated_pipe_user(struct auth_session_info *session_info)
+bool smbd_become_authenticated_pipe_user(struct auth_session_info *session_info)
{
if (!push_sec_ctx())
return False;
current_user.
****************************************************************************/
-bool unbecome_authenticated_pipe_user(void)
+bool smbd_unbecome_authenticated_pipe_user(void)
{
return pop_sec_ctx();
}