Skip to content

Commit

Permalink
Send ifaces_allow preference if ifaces is empty
Browse files Browse the repository at this point in the history
This makes it possible to forbid users to access any inferfaces.
  • Loading branch information
timopollmeier committed Apr 27, 2020
1 parent c14e006 commit dfca692
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,7 @@ send_ifaces_access_preferences (void)
ifaces = user_ifaces (current_credentials.uuid);
ifaces_allow = user_ifaces_allow (current_credentials.uuid);

if (ifaces && strlen (ifaces))
if (ifaces_allow || (ifaces && strlen (ifaces)))
{
char *pref;

Expand All @@ -1856,7 +1856,7 @@ send_ifaces_access_preferences (void)
return 0;
}

if (sendf_to_server ("%s <|> %s\n", pref, ifaces))
if (sendf_to_server ("%s <|> %s\n", pref, ifaces ? ifaces : ""))
{
g_free (ifaces);
return -1;
Expand Down

0 comments on commit dfca692

Please sign in to comment.