summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Olson <olson@cumulusnetworks.com>2017-06-21 15:13:02 -0700
committerDave Olson <olson@cumulusnetworks.com>2017-06-21 15:23:44 -0700
commit5c6df6ac03f04f195c6f3bb9fe8b1725428de129 (patch)
tree53cab0eda333806208770dad755bdce109a02052
parentb9b2e397455dd2cacbd1729941d8e898de41400d (diff)
downloadlibnss-mapuser-5c6df6ac03f04f195c6f3bb9fe8b1725428de129.tar.gz
libnss-mapuser-5c6df6ac03f04f195c6f3bb9fe8b1725428de129.zip
Random small fixes with everything now working
Fixed trailing whitespace Also fixed man page formatting issue Added misc to debian/control changelog modified to cumulus cl3u1
-rw-r--r--Makefile8
-rw-r--r--README2
-rw-r--r--debian/changelog2
-rw-r--r--debian/control2
-rw-r--r--mapuser_nss.conf2
-rw-r--r--nss_mapuid.c2
-rw-r--r--nss_mapuser.87
7 files changed, 13 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 2ff73a6..598123f 100644
--- a/Makefile
+++ b/Makefile
@@ -17,19 +17,19 @@ else
endif
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
STRIP = strip
- FVISIBILITY = -fvisibility=hidden
+ FVISIBILITY = -fvisibility=hidden
else
- STRIP=echo Nostrip
+ STRIP=echo Nostrip
FVISIBILITY = -fvisibility=default
endif
-CPPFLAGS = -D_FORTIFY_SOURCE=2
+CPPFLAGS = -D_FORTIFY_SOURCE=2
CFLAGS = $(CPPFLAGS) ${OPTFLAGS} -fPIC -fstack-protector-strong \
-Wformat -Werror=format-security -Wall $(FVISIBILITY)
LDFLAGS = -shared -fPIC -DPIC \
-Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-soname -Wl,$@
-all: $(NSSNAMELIB) $(NSSUIDLIB)
+all: $(NSSNAMELIB) $(NSSUIDLIB)
$(NSSUIDLIB): $(UID_SOURCE:.c=.o)
$(CC) $(LDFLAGS) $^ -o $@
diff --git a/README b/README
index eb3ac40..efcec72 100644
--- a/README
+++ b/README
@@ -41,7 +41,7 @@ already exist, and that is the default mapping in the configuration, and will
add the group radius_users with the addgroup command.
The mapping can be changed in the configuration file /etc/mapuser_nss.conf.
-In that case, the account must already exist, or should be created with
+In that case, the account must already exist, or should be created with
a command similar to:
adduser --quiet --firstuid 1000 --disabled-login --ingroup GROUP \
--gecos "radius user" USERNAME
diff --git a/debian/changelog b/debian/changelog
index 93d0996..050d240 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-libnss-mapuser (1.0.0) unstable; urgency=low
+libnss-mapuser (1.0.0-cl3u1) unstable; urgency=low
* Initial version to do successful NSS lookups on any username,
and matching uid lookups back to the original name.
diff --git a/debian/control b/debian/control
index b727069..c383d86 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,7 @@ Homepage: http://www.cumulusnetworks.com
Package: libnss-mapuser
Architecture: any
-Depends: ${shlibs:Depends}, adduser
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
Description: NSS modules to map any requested username to a local account
Performs getpwname and getpwuid lookups via NSS for systems like RADIUS
where it is not possible to do a username lookup without authentication
diff --git a/mapuser_nss.conf b/mapuser_nss.conf
index c422b3e..4ddc42d 100644
--- a/mapuser_nss.conf
+++ b/mapuser_nss.conf
@@ -5,7 +5,7 @@
# Edit /etc/nsswitch.conf to add mapuer to the passwd lookup, similar to this
# where mapuser must be the be prior to compat, since uid lookups would
# otherwise always match via compat
-# passwd: mapuser compat
+# passwd: mapuser compat
# if set, errors and other issues are logged with syslog
# debug=1
diff --git a/nss_mapuid.c b/nss_mapuid.c
index a3f71f0..7b8faa7 100644
--- a/nss_mapuid.c
+++ b/nss_mapuid.c
@@ -198,7 +198,7 @@ enum nss_status _nss_mapuid_getpwuid_r(uid_t uid, struct passwd *pw,
nssname, uid, min_uid);
return status;
}
-
+
/* marshal the args for the lower level functions */
pb.pw = pw;
pb.buf = buffer;
diff --git a/nss_mapuser.8 b/nss_mapuser.8
index 6d10516..c74694f 100644
--- a/nss_mapuser.8
+++ b/nss_mapuser.8
@@ -43,14 +43,15 @@ named account in the configuration file is
and that entry in
.I /etc/passwd
is
-.IP
+.RS
.B radius_user:x:1017:1002:radius user,,,:/home/radius_user:/bin/bash
-.PP
+.RE
then the matching line returned by
.I getent passwd daveolson
would be
-.IP
+.RS
.B daveolson:x:1017:1002:daveolson mapped user:/home/daveolson:/bin/bash
+.RE
.PP
The matching lookup on the uid will only be successful if
.B daveolson