Exemplo n.º 1
0
bool pipe_access_check(pipes_struct *p)
{
	/* Don't let anonymous users access this RPC if restrict
	   anonymous > 0 */

	if (lp_restrict_anonymous() > 0) {

		/* schannel, so we must be ok */
		if (p->pipe_bound && (p->auth.auth_type == PIPE_AUTH_TYPE_SCHANNEL)) {
			return True;
		}

		if (p->server_info->guest) {
			return False;
		}
	}

	return True;
}
Exemplo n.º 2
0
BOOL pipe_access_check(pipes_struct *p)
{
	/* Don't let anonymous users access this RPC if restrict
	   anonymous > 0 */

	if (lp_restrict_anonymous() > 0) {
		user_struct *user = get_valid_user_struct(p->vuid);

		if (!user) {
			DEBUG(3, ("invalid vuid %d\n", p->vuid));
			return False;
		}

		if (user->guest)
			return False;
	}

	return True;
}
Exemplo n.º 3
0
bool pipe_access_check(struct pipes_struct *p)
{
	/* Don't let anonymous users access this RPC if restrict
	   anonymous > 0 */

	if (lp_restrict_anonymous() > 0) {

		/* schannel, so we must be ok */
		if (p->pipe_bound &&
		    (p->auth.auth_type == DCERPC_AUTH_TYPE_SCHANNEL)) {
			return True;
		}

		if (security_session_user_level(p->session_info, NULL) < SECURITY_USER) {
			return False;
		}
	}

	return True;
}