Exemplo n.º 1
0
Arquivo: uid.c Projeto: Arkhont/samba
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();
}
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
Arquivo: uid.c Projeto: Arkhont/samba
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;
}
Exemplo n.º 4
0
void become_root(void)
{
	push_sec_ctx();
	push_conn_ctx();
	set_root_sec_ctx();
}