summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-01-14 22:29:30 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-01-14 22:29:30 +0100
commit6b9c59efc9db4aa710d7c243d566973006020d42 (patch)
treef8da5b18b935f603b72eb37898f57a9df19369e1 /src/config.y
parentba3afc50b3819694f009adc6db5a966f524242f6 (diff)
downloadfastd-6b9c59efc9db4aa710d7c243d566973006020d42.tar
fastd-6b9c59efc9db4aa710d7c243d566973006020d42.zip
Refactor handling of platforms without user/group settings (Android)
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/config.y b/src/config.y
index c998a41..404ac1d 100644
--- a/src/config.y
+++ b/src/config.y
@@ -213,13 +213,23 @@ peer_group_statement:
;
user: TOK_STRING {
+#ifdef USE_USER
free(conf.user);
conf.user = fastd_strdup($1->str);
+#else
+ fastd_config_error(&@$, state, "user setting is not supported on this platform");
+ YYERROR;
+#endif
}
group: TOK_STRING {
+#ifdef USE_USER
free(conf.group);
conf.group = fastd_strdup($1->str);
+#else
+ fastd_config_error(&@$, state, "group setting is not supported on this platform");
+ YYERROR;
+#endif
}
drop_capabilities: