diff --git a/ChangeLog b/ChangeLog index 7bd9c41f..ad395c90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22123,3 +22123,6 @@ * Fixed a bug in rdimport(1) that caused the cart title uniqueness check to be applied to the incorrect string when the '--set-string-title=' switch was used. +2021-07-29 Fred Gleason + * Fixed regressions in rdimport(1) and the WebGet service + that threw 500 errors when connecting to WebGet. diff --git a/utils/rdimport/rdimport.cpp b/utils/rdimport/rdimport.cpp index c35e4854..c8be1b85 100644 --- a/utils/rdimport/rdimport.cpp +++ b/utils/rdimport/rdimport.cpp @@ -2340,7 +2340,8 @@ void MainObject::ErrorExit(RDApplication::ExitCode code) const int main(int argc,char *argv[]) { - QCoreApplication a(argc,argv,false); + QCoreApplication::setSetuidAllowed(true); + QCoreApplication a(argc,argv); new MainObject(); return a.exec(); } diff --git a/web/webget/webget.cpp b/web/webget/webget.cpp index 7ffc061a..fc6d36af 100644 --- a/web/webget/webget.cpp +++ b/web/webget/webget.cpp @@ -66,12 +66,14 @@ MainObject::MainObject(QObject *parent) // // Drop root permissions // + /* if(setgid(rda->config()->gid())<0) { TextExit("Unable to set Rivendell group",500,LINE_NUMBER); } if(setuid(rda->config()->uid())<0) { TextExit("Unable to set Rivendell user",500,LINE_NUMBER); } + */ if(getuid()==0) { TextExit("Rivendell user should never be \"root\"!",500,LINE_NUMBER); } @@ -643,7 +645,7 @@ void MainObject::ServeForm() QString().sprintf("`GROUPS`.`DEFAULT_CART_TYPE`=%u && ",RDCart::Audio)+ "`GROUPS`.`DEFAULT_LOW_CART`>0 && "+ "`GROUPS`.`DEFAULT_HIGH_CART`>0 "+ - "order by `GROUPS.NAME`"; + "order by `GROUPS`.`NAME`"; q=new RDSqlQuery(sql); while(q->next()) { printf(" \n", @@ -773,6 +775,7 @@ void MainObject::Exit(int code) if(webget_post!=NULL) { delete webget_post; } + rda->syslog(LOG_NOTICE,"EXIT 1"); exit(code); } @@ -791,13 +794,15 @@ void MainObject::TextExit(const QString &msg,int code,int srcline) const printf("\n"); printf("[Line: %d]\n",srcline); #endif // RDXPORT_DEBUG + rda->syslog(LOG_NOTICE,"EXIT 2"); exit(0); } int main(int argc,char *argv[]) { - QCoreApplication a(argc,argv,false); + QCoreApplication::setSetuidAllowed(true); + QCoreApplication a(argc,argv); new MainObject(); return a.exec(); }