summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-04-04Jenkins: use build library from proper branch "equuleus"equuleusChristian Poessinger
2020-06-23Jenkins: T2625: migrate to build libraryChristian Poessinger
2020-03-21Fix wrong lengths for "map_min_uid=".Paul Long
2020-03-21Fix documentation for minimum UID parametermadjack
2020-03-21README: fix typomadjack
2020-03-21Jenkins: T1870: support GitHub PullRequest buildsChristian Poessinger
2020-02-01Jenkins: import pipelineChristian Poessinger
2019-12-27Jenkins: package no longer required in VyOS 1.3Christian Poessinger
2019-05-13Update JenkinsfileKim
2019-05-13update package list before getting build dependsKim Hagen
2019-05-13Create Jenkinsfile currentKim Hagen
2018-05-17Create users from vyatta-cfg-system package and update nnswitch in configUnicronNL
2018-04-13Merge branch 'dev' into release/cl-stableDave Olson
Conflicts: debian/changelog debian/libnss-mapuser.postinst map_common.c nss_mapuser.5 nss_mapuser.conf
2018-04-13Changes and cleanups around the privileged user.Dave Olson
Ticket: CM-19457 Reviewed By: nobody Testing Done: lots of logins, and login combinations Validate that the mapuser database files are valid by using kill 0 on the pids. If not valid, try to unlink, and if we do, report it as a DEBUG. If we can't unlink (not root) report that we are skipping at INFO. As part of that, don't count valid fields and read entire file. Document in man page and config file that the mapped_priv_user account is known to libpam-radius-auth as well, and must be updated in both places if it changes. Updated the public symbols (the getgr additions) from previous commit Fixed some white space and line length issues.
2018-04-10cleanup group mapname in nsswitch on remove; add priv user to sudo groupDave Olson
Needed to add sed code to remove mapname from nsswitch.conf group search line, similar to passwd line. Somehow forgot that when I added the code to add it in postinst I also somehow forgot to checkin the adduser line to add the radius_priv_user to the sudo group, so fixed that too.
2018-04-10bumped version number to 1.1.0 given significant new featuresDave Olson
2018-04-10Add VSA shell:priv-lvl support for privileged radius user loginsDave Olson
Ticket: CM-19457 Reviewed By: roopa Testing Done: lots of variations of login, su, sudo, automated radius tests Now we always read the map files. If session is set, we try that file first, so that a user always sees their name, same as tacplus. If that's the wrong file, read through all of the map files, look for the correct match based on either name+session or auid+session, depending on getpwnam or getpwuid entry point Ignore same set of users as tacacs, including new radius_priv_user account for the privileged RADIUS user. create and delete the mapuser files from libpam-radius-auth now; we need to have the mapping file written early enough for the pam interfaces to get the correct info. Using the pam_script is too limiting, and since we are creating the database in libpam-radius-auth now, we'll delete it there as well to keep things symmetric, so delete the script and the references to the scripts A significant part of this effort was adding getgrent, getgrgid, and getgrnam support, so that the radius users are put into the netshow (unprivileged) and netedit and sudo (privileged) groups at login. A lot of restructuring went in as part of that, and cleaned up some longstanding bugs, including return values for the getpw* routines. Also cleaned up some whitespace issues. Also renamed some globals (debug, min_uid, init_common()) that might collide with other programs, so that when I build unstripped and normal visibility shared libs, they won't collide with programs calling the functions (saw this with "debug" and bgpd, for example).
2018-04-10Cleanup whitespace by running 'indent -linux' on all the filesDave Olson
There were no code changes, just the indent whitespace and formatting changes.
2018-04-10Fixed exclude_users to work, added more users, alway skip tacacs[0-9]*Dave Olson
Ticket: CM-19886 Reviewed By: nobody Testing Done: Somehow exclude_users wasn't implemented (or got deleted somewhere along the line). Make list match tacplus_client, except exclude our own mapped users by matching config items, and also skip any user starting with tacacs[0-9] inline instead of listing all 16 in exclude_users field in config file. Implemened for mapped_priv_user too, since that work is ongoing. Listed change in debian/changelog If debug is set to 2 or higher, print that the name lookup was skipped due to exclusion.
2018-04-06cleanup group mapname in nsswitch on remove; add priv user to sudo groupDave Olson
Needed to add sed code to remove mapname from nsswitch.conf group search line, similar to passwd line. Somehow forgot that when I added the code to add it in postinst I also somehow forgot to checkin the adduser line to add the radius_priv_user to the sudo group, so fixed that too.
2018-04-03bumped version number to 1.1.0 given significant new featuresDave Olson
2018-04-02Add VSA shell:priv-lvl support for privileged radius user loginsDave Olson
Ticket: CM-19457 Reviewed By: roopa Testing Done: lots of variations of login, su, sudo, automated radius tests Now we always read the map files. If session is set, we try that file first, so that a user always sees their name, same as tacplus. If that's the wrong file, read through all of the map files, look for the correct match based on either name+session or auid+session, depending on getpwnam or getpwuid entry point Ignore same set of users as tacacs, including new radius_priv_user account for the privileged RADIUS user. create and delete the mapuser files from libpam-radius-auth now; we need to have the mapping file written early enough for the pam interfaces to get the correct info. Using the pam_script is too limiting, and since we are creating the database in libpam-radius-auth now, we'll delete it there as well to keep things symmetric, so delete the script and the references to the scripts A significant part of this effort was adding getgrent, getgrgid, and getgrnam support, so that the radius users are put into the netshow (unprivileged) and netedit and sudo (privileged) groups at login. A lot of restructuring went in as part of that, and cleaned up some longstanding bugs, including return values for the getpw* routines. Also cleaned up some whitespace issues. Also renamed some globals (debug, min_uid, init_common()) that might collide with other programs, so that when I build unstripped and normal visibility shared libs, they won't collide with programs calling the functions (saw this with "debug" and bgpd, for example).
2018-04-02Cleanup whitespace by running 'indent -linux' on all the filesDave Olson
There were no code changes, just the indent whitespace and formatting changes.
2018-02-26Fixed exclude_users to work, added more users, alway skip tacacs[0-9]*Dave Olson
Ticket: CM-19886 Reviewed By: nobody Testing Done: Somehow exclude_users wasn't implemented (or got deleted somewhere along the line). Make list match tacplus_client, except exclude our own mapped users by matching config items, and also skip any user starting with tacacs[0-9] inline instead of listing all 16 in exclude_users field in config file. Implemened for mapped_priv_user too, since that work is ongoing. Listed change in debian/changelog If debug is set to 2 or higher, print that the name lookup was skipped due to exclusion.
2018-01-22Merge branch 'dev' into release/cl-stableDave Olson
2018-01-17Added daemon and nobody to exclude_users listDave Olson
Ticket: CM-19469 Reviewed By: nobody Testing Done: ran with change. Similar to the change for tacacs, but this already had snmp. Added quagga as well, for users that haven't completed the transition from quagga to frr. Bumped changelog and documented
2018-01-17Added daemon and nobody to exclude_users listDave Olson
Ticket: CM-19469 Reviewed By: nobody Testing Done: ran with change. Similar to the change for tacacs, but this already had snmp. Added quagga as well, for users that haven't completed the transition from quagga to frr.
2017-08-07Do not use mapuser functionality with useradd,userdel,usermodDave Olson
Ticket: CM-17450 Reviewed By: olson Testing Done: ran programs with change The useradd family will not work correctly with the mapuser/mapuid functionality, and useradd provides no method to force creating a user that already exists. So check which program invoked us, using __progname (getprogname() could also be used for non-glibc use), and return NOTFOUND immediately in that case. This is a major hack, but it's simple, and avoids a significant issue. Unfortunately, the RADIUS protocol gives us no way to determine that an account name is valid without also authenticating, and libnss plugins do not have the ability to authenticate.
2017-08-07Do not use mapuser functionality with useradd,userdel,usermodDave Olson
Ticket: CM-17450 Reviewed By: olson Testing Done: ran programs with change The useradd family will not work correctly with the mapuser/mapuid functionality, and useradd provides no method to force creating a user that already exists. So check which program invoked us, using __progname (getprogname() could also be used for non-glibc use), and return NOTFOUND immediately in that case. This is a major hack, but it's simple, and avoids a significant issue. Unfortunately, the RADIUS protocol gives us no way to determine that an account name is valid without also authenticating, and libnss plugins do not have the ability to authenticate.
2017-07-18updated changelog to RELEASED so I can merge to stableDave Olson
2017-06-23Fixed remove to clean up plugin entries in nsswitch.confDave Olson
Ticket: CM-16909 Reviewed By: nobody Testing Done: installed, upgraded, removed We weren't removing the mapuser plugins in nsswitch.conf on package remove, now we do. Also cleaned up a bit and use \s instead of [ \t] for whitespace.
2017-06-22Removed mapfile cleanup workaround, implemented solutionDave Olson
We need to remove the mapping file for the session when it is closing and the close script is called via pam_script, but not remove it when the close is called from ending an sudo session, etc. Check which processes are in the current session, and if any of them are not one of sshd, sudo, login, su, or telnetd, then don't do the cleanup (normally it will be a shell). Cleanup won't happen if the user leaves jobs running when they logout (e.g., via setsid), but that's fairly benign. Even with very long system uptimes, these are small files, and will not be a significant issue. At some future point, we might add garbage collection for any session files found in the dbdir.
2017-06-22Add a few more users to the exclude listDave Olson
2017-06-22Fixed formatting and length of passwd examplesDave Olson
2017-06-22Fixed naming of nss_mapuser.5 and conf file; naming in manpagesDave Olson
2017-06-21Fix problem with sudo, su, etc. in pam_script scriptsDave Olson
The flat file was overwritten on su, sudo, etc. Fixed that. The flat file was removed on exit from su, sudo, etc. I've temporarily worked around that by not cleaning up. Need to do a better job, but this will let testing continue.
2017-06-21Random small fixes with everything now workingDave Olson
Fixed trailing whitespace Also fixed man page formatting issue Added misc to debian/control changelog modified to cumulus cl3u1
2017-06-21Add man pages for the plugins and the configuration fileDave Olson
2017-06-15Initial version of libnss-mapuser packageDave Olson
See README for details