[SCM] NSS Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Wed Jan 22 02:33:20 MST 2014

The branch, master has been updated
       via  e7e1cf3 Update README.
       via  b711455 cmake: Add cmake config mode file.
       via  3f4070e cmake: Add pkgconfig file.
      from  6cf4553 nwrap: Fix fd checks.


- Log -----------------------------------------------------------------
commit e7e1cf368958d20b8174e035e9faca8be291341e
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jan 22 10:33:06 2014 +0100

    Update README.

commit b711455f25980f0e8bc6049c9f800d3fdbeac20a
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jan 22 10:29:07 2014 +0100

    cmake: Add cmake config mode file.

commit 3f4070e7d15528e785fe11de8ca62ba56613f059
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jan 22 10:28:11 2014 +0100

    cmake: Add pkgconfig file.


Summary of changes:
 CMakeLists.txt                      |   22 ++++++++++++++++
 README                              |   47 +++++++++++++++++++++++++++++------
 nss_wrapper-config-version.cmake.in |   11 ++++++++
 nss_wrapper.pc.cmake                |    3 ++
 4 files changed, 75 insertions(+), 8 deletions(-)
 create mode 100644 nss_wrapper-config-version.cmake.in
 create mode 100644 nss_wrapper.pc.cmake

Changeset truncated at 500 lines:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8b0ad0..8359849 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,6 +56,28 @@ install(
+# pkg-config file
+configure_file(nss_wrapper.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/nss_wrapper.pc @ONLY)
+    ${CMAKE_CURRENT_BINARY_DIR}/nss_wrapper.pc
+    ${LIB_INSTALL_DIR}/pkgconfig
+    pkgconfig
+# cmake config files
+configure_file(nss_wrapper-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/nss_wrapper-config-version.cmake @ONLY)
+    FILES
+        ${CMAKE_CURRENT_BINARY_DIR}/nss_wrapper-config-version.cmake
+        devel
     find_package(CMocka REQUIRED)
diff --git a/README b/README
index 53646c7..3edef91 100644
--- a/README
+++ b/README
@@ -1,19 +1,50 @@
 NSS wrapper library
-This is a wrapper for the user, group and hosts NSS API allowing the use of
-other data sources.
+There are projects which provide daemons needing to be able to create, modify
+and delete unix users. Or just switch user ids to interact with the system e.g.
+a user space file server. To be able to test that you need the privilege to
+modify the passwd and groups file. With nss_wrapper it is possible to define
+your own passwd and groups file which will be used by software to act correctly
+while under test.
-To be able to use it you need to set the following environment variables:
+If you have a client and server under test they normally use functions to
+resolve network names to addresses (dns) or vice versa. The nss_wrappers allow
+you to create a hosts file to setup name resolution for the addresses you use
+with socket_wrapper.
+The first environment variable you need to set is:
+For user and group accounts you need to create two files: 'passwd' and 'group'.
+The format of the passwd file is described in 'man 5 passwd' and the group file
+in 'man 5 group'. So you can fill these files with made up accounts. You point
+nss_wrapper to them using the two variables:
+NSS_WRAPPER_PASSWD=/path/to/your/passwd and
+If you also need to emulate network name resolution in your enviornment,
+especially with socket_wrapper, you can write a hosts file. The format is
+described in 'man 5 hosts'. Then you can point nss_wrapper to your hosts
+file using:
+If you need to return a hostname which is different from the one of your
+machine is using you can use:
-You can either enable user and group resolving or only hosts. If you don't know
-how the passwd file should look like, please read 'man 5 passwd', for the
-groups file 'man 5 group' and for hosts 'man 5 hosts'.
+If you have a project which also provides user and group information out of a
+database, you normally write your own nss modules. nss_wrapper is able to load
+nss modules and ask them first before looking into the faked passwd and group
+file. To point nss_wrapper to the module you can do that using
+As each nss module has a special prefix like _nss_winbind_getpwnam() you need
+to set the prefix too so nss_wrapper can load the functions with:
diff --git a/nss_wrapper-config-version.cmake.in b/nss_wrapper-config-version.cmake.in
new file mode 100644
index 0000000..98f292c
--- /dev/null
+++ b/nss_wrapper-config-version.cmake.in
@@ -0,0 +1,11 @@
+# Check whether the requested PACKAGE_FIND_VERSION is compatible
+    endif()
diff --git a/nss_wrapper.pc.cmake b/nss_wrapper.pc.cmake
new file mode 100644
index 0000000..6fb8ff2
--- /dev/null
+++ b/nss_wrapper.pc.cmake
@@ -0,0 +1,3 @@
+Description: The nss_wrapper library

NSS Wrapper Repository

More information about the samba-cvs mailing list