Commented non-existing functions in android NDK.
Prefix scripts execution with shell binary to allow execution on no-exec mount points.
Everyything is currently hard coded, while it should use pre-compiler variables...
free(scriptname);
return true;
}
+ else
+ {
+ // Ugly hard-code allowing execution of scripts on android without execution flag (such as on /sdcard)
+ free(scriptname);
+ len = xasprintf(&scriptname, "/system/bin/sh \"%s/%s\"", confbase, name);
+ if(len < 0)
+ {
+ return false;
+ }
+ }
#endif
ifdebug(STATUS) logger(LOG_INFO, "Executing script %s", name);
"initgroups", strerror(errno));
return false;
}
- endgrent();
- endpwent();
+ // Not supported in android NDK
+ //endgrent();
+ //endpwent();
}
if (do_chroot) {
tzset(); /* for proper timestamps in logs */