mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-29 16:50:13 +01:00
2017-04-06 Fred Gleason <fredg@paravelsystems.com>
* Added an rdauth(1) utility in 'utils/rdauth/'. * Fixed a regression in 'lib/rdcart.cpp' that caused the 'Import' web API call to fail with an 'unsupported format' error.
This commit is contained in:
@@ -52,6 +52,19 @@ Xport::Xport(QObject *parent)
|
||||
xport_config=new RDConfig();
|
||||
xport_config->load();
|
||||
|
||||
//
|
||||
// Drop root permissions
|
||||
//
|
||||
if(setgid(xport_config->gid())<0) {
|
||||
XmlExit("Unable to set Rivendell group",500);
|
||||
}
|
||||
if(setuid(xport_config->uid())<0) {
|
||||
XmlExit("Unable to set Rivendell user",500);
|
||||
}
|
||||
if(getuid()==0) {
|
||||
XmlExit("Rivendell user should never be \"root\"!",500);
|
||||
}
|
||||
|
||||
//
|
||||
// Open Database
|
||||
//
|
||||
@@ -126,19 +139,6 @@ Xport::Xport(QObject *parent)
|
||||
XmlExit("Invalid User",403);
|
||||
}
|
||||
|
||||
//
|
||||
// Drop root permissions
|
||||
//
|
||||
if(setgid(xport_config->gid())<0) {
|
||||
XmlExit("Unable to set Rivendell group",500);
|
||||
}
|
||||
if(setuid(xport_config->uid())<0) {
|
||||
XmlExit("Unable to set Rivendell user",500);
|
||||
}
|
||||
if(getuid()==0) {
|
||||
XmlExit("Rivendell user should never be \"root\"!",500);
|
||||
}
|
||||
|
||||
//
|
||||
// Read Command Variable and Dispatch
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user