summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/PropertyNames.cpp5
-rw-r--r--cpp/src/Ice/PropertyNames.h4
-rw-r--r--cpp/src/IceGrid/ServerI.cpp10
3 files changed, 11 insertions, 8 deletions
diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp
index 6416990cad5..47e33bf6531 100644
--- a/cpp/src/Ice/PropertyNames.cpp
+++ b/cpp/src/Ice/PropertyNames.cpp
@@ -6,8 +6,8 @@
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
-
-// Generated by makeprops.py from file XXX- stuff needs to go here!
+//
+// Generated by makeprops.py from file ../config/PropertyNames.xml, Thu Jun 14 09:48:19 2007
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
@@ -148,6 +148,7 @@ const IceInternal::Property IceGridPropsData[] =
{
IceInternal::Property("IceGrid.InstanceName", false, 0),
IceInternal::Property("IceGrid.Node.AdapterId", false, 0),
+ IceInternal::Property("IceGrid.Node.AllowRunningServersAsRoot", false, 0),
IceInternal::Property("IceGrid.Node.CollocateRegistry", false, 0),
IceInternal::Property("IceGrid.Node.Data", false, 0),
IceInternal::Property("IceGrid.Node.DisableOnFailure", false, 0),
diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h
index aa4b136a159..867a9e780a6 100644
--- a/cpp/src/Ice/PropertyNames.h
+++ b/cpp/src/Ice/PropertyNames.h
@@ -6,8 +6,8 @@
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
-
-// Generated by makeprops.py from file XXX- stuff needs to go here!
+//
+// Generated by makeprops.py from file ../config/PropertyNames.xml, Thu Jun 14 09:48:19 2007
// IMPORTANT: Do not edit this file -- any edits made here will be lost!
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp
index 3f8a54df064..27fd7396399 100644
--- a/cpp/src/IceGrid/ServerI.cpp
+++ b/cpp/src/IceGrid/ServerI.cpp
@@ -1934,10 +1934,12 @@ ServerI::updateImpl(const InternalServerDescriptorPtr& descriptor)
throw "node has insufficient privileges to load server under user account `" + user + "'";
}
- if(pw->pw_uid == 0) // Don't allow running proccesses as "root"
- {
- throw "running server as `root' is not allowed";
- }
+
+ if(pw->pw_uid == 0 &&
+ _node->getCommunicator()->getProperties()->getPropertyAsInt("IceGrid.Node.AllowRunningServersAsRoot") == 0)
+ {
+ throw "running server as `root' is not allowed";
+ }
newUser = _uid != pw->pw_uid || _gid != pw->pw_gid;
_uid = pw->pw_uid;