mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-26 12:36:15 -05:00
fix db_init after dropping privs
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -472,13 +472,20 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
if((config.use_mdns) && (!parseonly)) {
|
||||
fprintf(stderr,"Starting rendezvous daemon\n");
|
||||
fprintf(stderr,"Starting rendezvous daemon -- indexing "
|
||||
"mp3 files... wait.\n");
|
||||
if(rend_init(config.runas)) {
|
||||
perror("rend_init");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(db_open(config.db_dir)) {
|
||||
perror("db_open");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Drop privs here
|
||||
if(drop_privs(config.runas)) {
|
||||
perror("drop_privs");
|
||||
@@ -501,7 +508,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
/* Initialize the database before starting */
|
||||
if(db_init(config.dbdir)) {
|
||||
if(db_init()) {
|
||||
perror("db_init");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user