mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
auth: add default authorizations
When no auth module is specified, use our table of defaults to look up the default value of the check instead of always allowing everything. This was we can disallow client settings by default.
This commit is contained in:
parent
5b77c9f406
commit
f18f2619e1
1 changed files with 14 additions and 1 deletions
|
@ -468,6 +468,19 @@ default_check (GstRTSPAuth * auth, GstRTSPClientState * state,
|
|||
return res;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
no_auth_check (const gchar * check)
|
||||
{
|
||||
gboolean res;
|
||||
|
||||
if (g_str_equal (check, GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS))
|
||||
res = FALSE;
|
||||
else
|
||||
res = TRUE;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_auth_check:
|
||||
* @check: the item to check
|
||||
|
@ -491,7 +504,7 @@ gst_rtsp_auth_check (const gchar * check)
|
|||
|
||||
/* no auth, we don't need to check */
|
||||
if (!(auth = state->auth))
|
||||
return TRUE;
|
||||
return no_auth_check (check);
|
||||
|
||||
klass = GST_RTSP_AUTH_GET_CLASS (auth);
|
||||
|
||||
|
|
Loading…
Reference in a new issue