diff options
-rw-r--r-- | Makefile | 8 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/control | 2 | ||||
-rw-r--r-- | mapuser_nss.conf | 2 | ||||
-rw-r--r-- | nss_mapuid.c | 2 | ||||
-rw-r--r-- | nss_mapuser.8 | 7 |
7 files changed, 13 insertions, 12 deletions
@@ -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 $@ @@ -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 |