Skip to content

Commit

Permalink
[usb_moded] Add missing ifdef for sailfishaccesscontrol
Browse files Browse the repository at this point in the history
This adds a missing ifdef for sailfishaccesscontrol, as uid here can be
0 (without sailfishaccesscontrol) we don't want to check MIN/MAX values.
Also the MIN/MAX defines are ifdef'ed also, so we do not have them
anyway.
  • Loading branch information
mariogrip committed Aug 28, 2020
1 parent 778c4f7 commit 89f6a0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/usb_moded-config.c
Expand Up @@ -1108,10 +1108,12 @@ int config_is_roaming_not_allowed(void)
*/
bool config_user_clear(uid_t uid)
{
#ifdef SAILFISH_ACCESS_CONTROL
if (uid < MIN_ADDITIONAL_USER || uid > MAX_ADDITIONAL_USER) {
log_err("Invalid uid value: %d\n", uid);
return false;
}
#endif

GKeyFile *active_ini = g_key_file_new();
config_load_dynamic_config(active_ini);
Expand Down

0 comments on commit 89f6a0c

Please sign in to comment.