From 6b9c59efc9db4aa710d7c243d566973006020d42 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 14 Jan 2015 22:29:30 +0100 Subject: Refactor handling of platforms without user/group settings (Android) --- src/status.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/status.c') diff --git a/src/status.c b/src/status.c index 7505ef9..3c82e0c 100644 --- a/src/status.c +++ b/src/status.c @@ -203,6 +203,7 @@ void fastd_status_init(void) { return; } +#ifdef USE_USER uid_t uid = geteuid(); gid_t gid = getegid(); @@ -212,7 +213,7 @@ void fastd_status_init(void) { if (seteuid(conf.uid) < 0) pr_debug_errno("seteuid"); } - +#endif ctx.status_fd = socket(AF_UNIX, SOCK_STREAM, 0); if (ctx.status_fd < 0) @@ -242,10 +243,12 @@ void fastd_status_init(void) { exit_errno("fastd_status_init: listen"); +#ifdef USE_USER if (seteuid(uid) < 0) pr_debug_errno("seteuid"); if (setegid(gid) < 0) pr_debug_errno("setegid"); +#endif } /** Closes the status socket */ -- cgit v1.2.3