void smbd_become_root(void) { /* * no good way to handle push_sec_ctx() failing without changing * the prototype of become_root() */ if (!push_sec_ctx()) { smb_panic("become_root: push_sec_ctx failed"); } push_conn_ctx(); set_root_sec_ctx(); }
BOOL become_user(connection_struct *conn, uint16 vuid) { if (!push_sec_ctx()) return False; push_conn_ctx(); if (!change_to_user(conn, vuid)) { pop_sec_ctx(); pop_conn_ctx(); return False; } return True; }
bool become_user_by_session(connection_struct *conn, const struct auth_serversupplied_info *session_info) { if (!push_sec_ctx()) return false; push_conn_ctx(); if (!change_to_user_by_session(conn, session_info)) { pop_sec_ctx(); pop_conn_ctx(); return false; } return true; }
void become_root(void) { push_sec_ctx(); push_conn_ctx(); set_root_sec_ctx(); }