myserver-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-4-g3


From: Giuseppe Scrivano
Subject: [myserver-commit] [SCM] GNU MyServer branch, master, updated. 0_9_2-4-g350cd5a
Date: Tue, 16 Feb 2010 16:56:47 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU MyServer".

The branch, master has been updated
       via  350cd5a0fb970bbb103a3996fa2bb0c70e7eec1a (commit)
       via  a20502f7085be5deb06892670e0a4a2fa2c907b4 (commit)
      from  55f8bc1720d6423c53a6d2434441372ca0768d0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------


commit 350cd5a0fb970bbb103a3996fa2bb0c70e7eec1a
Author: Giuseppe Scrivano <address@hidden>
Date:   Tue Feb 16 17:56:23 2010 +0100

    If the user is not found, TestHomeDir::testGetAdmin exits immediately.

diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index 2e5c4fd..467d333 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -76,7 +76,7 @@ public:
                 || errno == EPERM))
       return;
 #elif !WIN32
-    if (! FilesUtility::fileExists ("/etc/passwd"))
+    if (! FilesUtility::fileExists ("/etc/passwd") || dir.length ())
       return;
 #endif
 



commit a20502f7085be5deb06892670e0a4a2fa2c907b4
Author: Giuseppe Scrivano <address@hidden>
Date:   Tue Feb 16 17:46:31 2010 +0100

    The configure script sets HAVE_GETPWNAM not GETPWNAM, use it accordingly.

diff --git a/myserver/include/base/home_dir/home_dir.h 
b/myserver/include/base/home_dir/home_dir.h
index df0bf24..194a4cc 100644
--- a/myserver/include/base/home_dir/home_dir.h
+++ b/myserver/include/base/home_dir/home_dir.h
@@ -47,7 +47,7 @@ private:
 
 # ifdef WIN32
   string data;
-# elif !GETPWNAM
+# elif !HAVE_GETPWNAM
   HashMap<string, string*> data;
 # endif
   time_t timestamp;
diff --git a/myserver/src/base/home_dir/home_dir.cpp 
b/myserver/src/base/home_dir/home_dir.cpp
index 8f0c61e..1870572 100644
--- a/myserver/src/base/home_dir/home_dir.cpp
+++ b/myserver/src/base/home_dir/home_dir.cpp
@@ -34,7 +34,7 @@ extern "C"
 #include <stdarg.h>
 #include <stdio.h>
 
-#ifdef GETPWNAM
+#ifdef HAVE_GETPWNAM
 # include <pwd.h>
 #endif
 
@@ -64,7 +64,7 @@ HomeDir::HomeDir ()
 {
 #ifdef WIN32
   data.assign ("");
-#elif !GETPWNAM
+#elif !HAVE_GETPWNAM
   data.clear ();
 #endif
   timestamp = 0;
@@ -89,7 +89,7 @@ void HomeDir::clear ()
 {
 #ifdef WIN32
   data.assign ("");
-#elif !GETPWNAM
+#elif !HAVE_GETPWNAM
   HashMap<string, string*>::Iterator i = data.begin ();
   for (; i != data.end (); i++)
     {
@@ -138,7 +138,7 @@ int HomeDir::loadImpl ()
         }
     }
   data.assign (buf);
-#elif !GETPWNAM
+#elif !HAVE_GETPWNAM
   File usersFile;
   u_long size;
   char* buffer;
@@ -235,7 +235,7 @@ int HomeDir::getHomeDir (string& userName, string& out)
   out.assign (data);
   out.append ("/");
   out.append (userName);
-#elif GETPWNAM
+#elif HAVE_GETPWNAM
   struct passwd *p;
   int ret = 0;
 
diff --git a/myserver/src/base/process/process.cpp 
b/myserver/src/base/process/process.cpp
index a6932f8..a167f6c 100644
--- a/myserver/src/base/process/process.cpp
+++ b/myserver/src/base/process/process.cpp
@@ -33,7 +33,7 @@ extern "C"
 # include <sys/types.h>
 # include <sys/wait.h>
 
-# ifdef GETPWNAM
+# ifdef HAVE_GETPWNAM
 #  include <pwd.h>
 # endif
 
@@ -335,7 +335,7 @@ uid_t Process::getUid (const char *user)
         return uid;
     }
 
-# ifdef GETPWNAM
+# ifdef HAVE_GETPWNAM
   struct passwd *u = getpwnam (user);
   if (u != NULL)
     return u->pw_uid;
diff --git a/myserver/tests/test_homedir.cpp b/myserver/tests/test_homedir.cpp
index 612752e..2e5c4fd 100644
--- a/myserver/tests/test_homedir.cpp
+++ b/myserver/tests/test_homedir.cpp
@@ -70,7 +70,7 @@ public:
     int ret = homeDir->getHomeDir (username, dir);
 
     /* FIXME: handle this case in homeDir::getHomeDir.  */
-#if GETPWNAM
+#if HAVE_GETPWNAM
     /* If the user could not be found, silently return.  */
     if (ret && (errno == ENOENT || errno == ESRCH || errno == EBADF
                 || errno == EPERM))

-----------------------------------------------------------------------

Summary of changes:
 myserver/include/base/home_dir/home_dir.h |    2 +-
 myserver/src/base/home_dir/home_dir.cpp   |   10 +++++-----
 myserver/src/base/process/process.cpp     |    4 ++--
 myserver/tests/test_homedir.cpp           |    4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU MyServer




reply via email to

[Prev in Thread] Current Thread [Next in Thread]