const char *superuser_username;
const char *superuser_password;
+static int access_noacl;
+
/**
*
*/
uint32_t bits = 0;
access_entry_t *ae;
+ if (access_noacl)
+ return 0;
+
if(username != NULL && superuser_username != NULL &&
password != NULL && superuser_password != NULL &&
!strcmp(username, superuser_username) &&
uint32_t r = 0;
int match = 0;
+ if(access_noacl)
+ return 0xffffffff;
+
if(superuser_username != NULL && superuser_password != NULL) {
SHA1_Init(&shactx);
*
*/
void
-access_init(int createdefault)
+access_init(int createdefault, int noacl)
{
dtable_t *dt;
htsmsg_t *r, *m;
struct timeval tv;
} randseed;
+ access_noacl = noacl;
+ if (noacl)
+ tvhlog(LOG_WARNING, "access", "Access control checking disabled");
+
randseed.pid = getpid();
gettimeofday(&randseed.tv, NULL);
RAND_seed(&randseed, sizeof(randseed));
dtable_record_store(dt, ae->ae_id, r);
htsmsg_destroy(r);
- tvhlog(LOG_WARNING, "accesscontrol",
+ tvhlog(LOG_WARNING, "access",
"Created default wide open access controle entry");
}
/**
*
*/
-void access_init(int createdefault);
+void access_init(int createdefault, int noacl);
#endif /* ACCESS_H_ */
opt_syslog = 0,
opt_uidebug = 0,
opt_abort = 0,
+ opt_noacl = 0,
opt_ipv6 = 0;
const char *opt_config = NULL,
*opt_user = NULL,
{ 0, "uidebug", "Enable webUI debug", OPT_BOOL, &opt_uidebug },
{ 'l', "log", "Log to file", OPT_STR, &log_path },
{ 'A', "abort", "Immediately abort", OPT_BOOL, &opt_abort },
+ { 0, "noacl", "Disable all access control checks",
+ OPT_BOOL, &opt_noacl },
#if ENABLE_LINUXDVB
{ 'R', "dvbraw", "Use rawts file to create virtual adapter",
OPT_STR, &opt_dvb_raw },
subscription_init();
- access_init(opt_firstrun);
+ access_init(opt_firstrun, opt_noacl);
#if ENABLE_LINUXDVB
muxes_init();