summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkumpf <kumpf>2007-02-15 22:10:41 +0000
committerkumpf <kumpf>2007-02-15 22:10:41 +0000
commitd0a216b2ba52eb717ee43a4fbf3690633ed6c957 (patch)
tree22962144f8d08cdcf3522eb928440555007b76ff
parent71df5e52db6d759c52d6ff117b1bd712e1a3df2e (diff)
downloadtog-pegasus-PEP286_PRIVILEGE_SEPARATION_BRANCH.zip
tog-pegasus-PEP286_PRIVILEGE_SEPARATION_BRANCH.tar.gz
tog-pegasus-PEP286_PRIVILEGE_SEPARATION_BRANCH.tar.xz
TITLE: Privilege Separation DESCRIPTION: Fixes required for testing.
-rw-r--r--src/Executor/Parent.c22
-rw-r--r--src/Executor/PasswordFile.c6
-rw-r--r--src/Executor/Policy.c4
-rw-r--r--src/Pegasus/Config/FixedPropertyTable.h2
-rw-r--r--src/Pegasus/Config/FixedPropertyTableHpux.h2
-rw-r--r--src/Pegasus/Config/FixedPropertyTableLinux.h2
6 files changed, 25 insertions, 13 deletions
diff --git a/src/Executor/Parent.c b/src/Executor/Parent.c
index 862854c..980dc09 100644
--- a/src/Executor/Parent.c
+++ b/src/Executor/Parent.c
@@ -244,13 +244,19 @@ static void HandleStartProviderAgentRequest(int sock)
if (GetSessionKeyAuthenticated(&key, &authenticated) != 0)
{
- Log(LL_SEVERE, "attempted to start provider module \"%s\" as "
- "user \"%s\", using unknown session key");
+ Log(LL_SEVERE,
+ "attempted to start provider module \"%s\" as "
+ "user ID \"%s\", using unknown session key",
+ request.module,
+ request.uid);
}
else if (!authenticated)
{
- Log(LL_SEVERE, "attempted to start provider module \"%s\" as "
- "user \"%s\", using an unauthenticated session key");
+ Log(LL_SEVERE,
+ "attempted to start provider module \"%s\" as "
+ "user ID \"%s\", using unauthenticated session key",
+ request.module,
+ request.uid);
}
if (!authenticated)
@@ -556,7 +562,7 @@ static void HandleRenameFileRequest(int sock)
do
{
- // Check the policy.
+ /* Check the policy. */
if (CheckRenameFilePolicy(request.oldPath, request.newPath) != 0)
{
@@ -564,7 +570,7 @@ static void HandleRenameFileRequest(int sock)
break;
}
- // Rename the file.
+ /* Rename the file. */
if (rename(request.oldPath, request.newPath) != 0)
{
@@ -608,7 +614,7 @@ static void HandleRemoveFileRequest(int sock)
do
{
- // Check the policy.
+ /* Check the policy. */
if (CheckRemoveFilePolicy(request.path) != 0)
{
@@ -616,7 +622,7 @@ static void HandleRemoveFileRequest(int sock)
break;
}
- // Remove the file.
+ /* Remove the file. */
if (unlink(request.path) != 0)
{
diff --git a/src/Executor/PasswordFile.c b/src/Executor/PasswordFile.c
index 72e9513..2362a63 100644
--- a/src/Executor/PasswordFile.c
+++ b/src/Executor/PasswordFile.c
@@ -37,12 +37,12 @@ int CheckPasswordFile(
FILE* is;
char line[EXECUTOR_BUFFER_SIZE];
- // Open file.
+ /* Open file. */
if ((is = fopen(path, "r")) == NULL)
return -1;
- // Lookup encrypted password for this user.
+ /* Lookup encrypted password for this user. */
while (fgets(line, sizeof(line), is) != NULL)
{
@@ -100,7 +100,7 @@ int CheckPasswordFile(
}
}
- // User entry not found.
+ /* User entry not found. */
fclose(is);
return -1;
diff --git a/src/Executor/Policy.c b/src/Executor/Policy.c
index 83282a0..c005355 100644
--- a/src/Executor/Policy.c
+++ b/src/Executor/Policy.c
@@ -246,11 +246,11 @@ static int CheckPolicy(
continue;
}
- // Found a matching policy!
+ /* Found a matching policy! */
return 0;
}
- // Failed to find any matching policy.
+ /* Failed to find any matching policy. */
return -1;
}
diff --git a/src/Pegasus/Config/FixedPropertyTable.h b/src/Pegasus/Config/FixedPropertyTable.h
index f59b3b5..3e74fb6 100644
--- a/src/Pegasus/Config/FixedPropertyTable.h
+++ b/src/Pegasus/Config/FixedPropertyTable.h
@@ -1,3 +1,4 @@
+/*
//%2006////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
@@ -30,6 +31,7 @@
//==============================================================================
//
//%/////////////////////////////////////////////////////////////////////////////
+*/
#ifndef Pegasus_FixedPropertyTable_h
#define Pegasus_FixedPropertyTable_h
diff --git a/src/Pegasus/Config/FixedPropertyTableHpux.h b/src/Pegasus/Config/FixedPropertyTableHpux.h
index f6ad0ad..c47af09 100644
--- a/src/Pegasus/Config/FixedPropertyTableHpux.h
+++ b/src/Pegasus/Config/FixedPropertyTableHpux.h
@@ -1,3 +1,4 @@
+/*
//%2006////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
@@ -30,6 +31,7 @@
//==============================================================================
//
//%/////////////////////////////////////////////////////////////////////////////
+*/
#ifndef Pegasus_FixedPropertyTableHpux_h
#define Pegasus_FixedPropertyTableHpux_h
diff --git a/src/Pegasus/Config/FixedPropertyTableLinux.h b/src/Pegasus/Config/FixedPropertyTableLinux.h
index 26812b6..1066d7a 100644
--- a/src/Pegasus/Config/FixedPropertyTableLinux.h
+++ b/src/Pegasus/Config/FixedPropertyTableLinux.h
@@ -1,3 +1,4 @@
+/*
//%2006////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
@@ -30,6 +31,7 @@
//==============================================================================
//
//%/////////////////////////////////////////////////////////////////////////////
+*/
#if defined(PEGASUS_USE_RELEASE_DIRS) && \
defined(PEGASUS_OVERRIDE_DEFAULT_RELEASE_DIRS)