summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix FreeBSD IDs.David E. O'Brien2002-01-305-15/+12
| | | | Notes: svn path=/head/; revision=89999
* Still with asbestos longjohns on, completely PAMify login(1) and removeDag-Erling Smørgrav2002-01-301-19/+20
| | | | | | | | | code made redundant by various PAM modules (primarily pam_unix(8)). Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89994
* With asbestos longjohns on, integrate most of the checks normally done byDag-Erling Smørgrav2002-01-301-32/+102
| | | | | | | | | login(1) (password & account expiry, hosts.access etc.) into pam_unix(8). Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89993
* Move the code from pam_sm_authenticate() to pam_sm_acct_mgmt(). SimplifyDag-Erling Smørgrav2002-01-302-62/+58
| | | | | | | | | | | it a little and try to make it more resilient to various possible failure conditions. Change the man page accordingly, and take advantage of this opportunity to simplify its language. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89991
* Correct function's description.Chris D. Faulhaber2002-01-291-1/+1
| | | | | | | Obtained from: TrustedBSD Project Notes: svn path=/head/; revision=89953
* GC code that moved to crtbrand.c.David E. O'Brien2002-01-281-4/+0
| | | | Notes: svn path=/head/; revision=89930
* Do not try to convert to char already converted C monetary locale members.Andrey A. Chernov2002-01-282-28/+40
| | | | | | | Do this conversion on locale load stage instead. Notes: svn path=/head/; revision=89907
* o return EINVAL if acl_to_text() have been sent a NULL acl. ↵Chris D. Faulhaber2002-01-261-1/+6
| | | | | | | | | o update copyright dates. Reviewed by: rwatson Notes: svn path=/head/; revision=89831
* Use ctime_r to build the timestamp for syslog, so that we don'tDavid Malone2002-01-251-2/+2
| | | | | | | | | | | clobber a ctime buffer which is passed in. PR: 34022 Submitted by: Hartmut Brandt <brandt@fokus.gmd.de> MFC after: 2 weeks Notes: svn path=/head/; revision=89805
* Add libfetch.so.2 from a 17-Dec-2001 4.5-RC (releng4) build.David E. O'Brien2002-01-242-0/+456
| | | | Notes: svn path=/head/; revision=89761
* WARNS=4 fixes. Protect with NO_WERROR for the modules that haveMark Murray2002-01-2421-127/+138
| | | | | | | warnings that are hard to fix or that I've been asked to leave alone. Notes: svn path=/head/; revision=89760
* PAM modules shouldn't call putenv(); pam_putenv() is sufficient. TheDag-Erling Smørgrav2002-01-241-1/+0
| | | | | | | | | | caller is supposed to check the PAM envlist and export the variables it contains; if it doesn't, it's broken. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89753
* Change the order in which pam_sm_open_session() updates the logs. ThisDag-Erling Smørgrav2002-01-242-25/+14
| | | | | | | | | | | | | | doesn't really make any difference, except it matches wtmp(5) better. Don't do anything in pam_sm_close_session(); init(8) will take care of utmp and wtmp when the tty is released. Clearing them here would make it possible to create a ghost session by logging in, running 'login -f $USER' and exiting the subshell. Sponsored by: DARPA, NAI Labs (but the bugs are all mine) Notes: svn path=/head/; revision=89748
* Correctly interpret PAM_RHOST being unset as an indicator of a localDag-Erling Smørgrav2002-01-241-3/+2
| | | | | | | | | login. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89745
* Correctly interpret PAM_RHOST being unset as an indicator of a localDag-Erling Smørgrav2002-01-241-1/+5
| | | | | | | login. Notes: svn path=/head/; revision=89744
* Style nits.Dag-Erling Smørgrav2002-01-241-2/+2
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89743
* get __time_load_locale() prototype from include file, rather than declareAlexey Zelkin2002-01-241-3/+2
| | | | | | | own Notes: svn path=/head/; revision=89739
* * style(9)'fyAlexey Zelkin2002-01-242-33/+34
| | | | | | | * declare prototype for __time_load_locale() in timelocal.h Notes: svn path=/head/; revision=89736
* Fix problem where with PicoBSD the shell coredumps if it does not find anDavid E. O'Brien2002-01-241-1/+1
| | | | | | | | | entry for its terminal type in /etc/termcap. Submitted by: bde Notes: svn path=/head/; revision=89735
* Document the even_root option.Dag-Erling Smørgrav2002-01-241-1/+7
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89734
* Don't let root through unless the "even_root" option was specified.Dag-Erling Smørgrav2002-01-241-2/+16
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89733
* Change brk's prototype from char *brk(const char *) to int brk(const void *)David Malone2002-01-241-15/+7
| | | | | | | | | | | | | | | | | | and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t). This makes us more consistant with NetBSD and standards which include these functions. Bruce pointed out that ptrdiff_t would probably have been better than intptr_t, but this doesn't match other implimentations. Also remove local declarations of sbrk and unnecessary casting. PR: 32296 Tested by: Harti Brandt <brandt@fokus.gmd.de> MFC after: 1 month Notes: svn path=/head/; revision=89732
* Add a PAM module that records sessions in utmp/wtmp/lastlog.Dag-Erling Smørgrav2002-01-243-0/+369
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89728
* Fix some pastos. Rather shoddy of me...Dag-Erling Smørgrav2002-01-242-5/+5
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89727
* Add libfetch.so.2 from a 10-Dec-2001 releng4 build.David E. O'Brien2002-01-242-0/+392
| | | | Notes: svn path=/head/; revision=89724
* Add a PAM module that provides an account management component for checkingDag-Erling Smørgrav2002-01-233-0/+285
| | | | | | | | | | | | | | | | either PAM_RHOST or PAM_TTY against /etc/login.access.o This uncovers a problem with PAM_RHOST, in that if we always set it, there is no way to distinguish between a user logging in locally and a user logging in using 'ssh localhost'. This will be fixed by first making sure that all PAM modules can handle PAM_RHOST being unset (which is currently not the case), and then modifying su(1) and login(1) to not set it for local logins. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89707
* Add an AUTHORS section crediting ThinkSec, DARPA and NAI Labs.Dag-Erling Smørgrav2002-01-232-2/+16
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89706
* Add pam_ssh support to the static PAM library, libpam.a:Ruslan Ermilov2002-01-232-4/+5
| | | | | | | | | | | | | | - Spam /usr/lib some more by making libssh a standard library. - Tweak ${LIBPAM} and ${MINUSLPAM}. - Garbage collect unused libssh_pic.a. - Add fake -lz dependency to secure/ makefiles needed for dynamic linkage with -lssh. Reviewed by: des, markm Approved by: markm Notes: svn path=/head/; revision=89705
* Base the comparison on UIDs, not on user names.Dag-Erling Smørgrav2002-01-232-14/+12
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89704
* Make libssh.so useable (undefined reference to IPv4or6).Ruslan Ermilov2002-01-231-2/+0
| | | | | | | | Reviewed by: des, markm Approved by: markm Notes: svn path=/head/; revision=89703
* The sixth argument to the NET_RT_IFLIST sysctl is actually 0 forRuslan Ermilov2002-01-231-1/+1
| | | | | | | all interfaces, and ifnet.if_index value for a single interface. Notes: svn path=/head/; revision=89700
* Undo the work-around for the sendfile bug where nbytes needed the hdr/trlDavid Greenman2002-01-221-11/+0
| | | | | | | | | | size added to it in order for it to work properly when nbytes != 0. Reviewed by: alfred MFC after: 3 days Notes: svn path=/head/; revision=89676
* Restore C99 standard conformance information, isblank() _is_ in finalAndrey A. Chernov2002-01-221-0/+5
| | | | | | | | | standard document Pointed by: "Jacques A. Vidrine" <n@nectar.cc> Notes: svn path=/head/; revision=89670
* Use the proper type (gid_t) for (group)->gr_gid to be orthogonalMark Murray2002-01-225-15/+16
| | | | | | | | | with uid_t usage and (user)->pw_uid. PR: 3242 Notes: svn path=/head/; revision=89663
* Fix the description of the O_NONBLOCK flag to match reality.Ruslan Ermilov2002-01-221-2/+1
| | | | | | | | Prodded by: Maxim Konovalov <maxim@macomnet.ru> Obtained from: BSD/OS Notes: svn path=/head/; revision=89650
* Fix a typo I made in revision 1.5.Ruslan Ermilov2002-01-221-1/+1
| | | | | | | Submitted by: trevor Notes: svn path=/head/; revision=89647
* Finish cleanup in kvm.c revisions 1.10 and 1.11 -- mark sf (swapfile)Ruslan Ermilov2002-01-222-6/+4
| | | | | | | | | | | | argument to kvm_open() and kvm_openfiles() as unused. BSD didn't read swap since kvm.c CSRG revision 5.21 (u-area is pageable under new VM. no need to read from swap.) The old !NEWVM code was removed in CSRG revision 5.23 (~ten years ago). Notes: svn path=/head/; revision=89640
* Link pam_opieaccess, pam_self and pam_ssh into the static library.Dag-Erling Smørgrav2002-01-211-0/+3
| | | | | | | Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89627
* On second thought, getpwnam() failure should be treated just as if the userDag-Erling Smørgrav2002-01-211-4/+1
| | | | | | | | | | existed, but had no OPIE key, i.e. PAM_IGNORE. Pointed out by: ache Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89621
* Return PAM_SERVICE_ERR rather than PAM_USER_UNKNOWN if getpwnam() fails, asDag-Erling Smørgrav2002-01-211-1/+1
| | | | | | | | | | PAM_USER_UNKNOWN will break the chain, revealing to an attacker that the user does not exist. Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89620
* Further changes to allow enabling pam_opie(8) by default:Dag-Erling Smørgrav2002-01-212-12/+38
| | | | | | | | | | | | | | | | | | - Ignore the {try,use}_first_pass options by clearing PAM_AUTHTOK before challenging the user. These options are meaningless for pam_opie(8) since the user can't possibly know the right response before she sees the challenge. - Introduce the no_fake_prompts option. If this option is set, pam_opie(8) will fail - rather than present a bogus challenge - if the target user does not have an OPIE key. With this option, users who haven't set up OPIE won't have to wonder what that "weird otp-md5 s**t" means :) Reviewed by: ache, markm Sponsored by: DARPA, NAI Labs Notes: svn path=/head/; revision=89618
* Add a new module, pam_opieaccess(8), which is responsible for checkingDag-Erling Smørgrav2002-01-215-0/+300
| | | | | | | | | | | /etc/opieaccess and ~/.opiealways so we can decide what to do after pam_opie(8) fails. Sponsored by: DARPA, NAI Labs Reviewed by: ache, markm Notes: svn path=/head/; revision=89613
* snprintf bloat -> strlcpyAndrey A. Chernov2002-01-201-2/+3
| | | | | | | | | Add getpwnam return check Approved by: des, markm Notes: svn path=/head/; revision=89592
* Check the return value from read() when reading the CR/LF at the end of aDag-Erling Smørgrav2002-01-201-2/+4
| | | | | | | | | | chunk. PR: bin/33608 MFC after: 2 weeks Notes: svn path=/head/; revision=89590
* Mark uploads as O_WRONLY, not O_RDONLY.Dag-Erling Smørgrav2002-01-201-2/+6
| | | | | | | | PR: misc/34043 MFC after: 2 weeks Notes: svn path=/head/; revision=89589
* Minor typo fix: uquad_t -> u_quad_t.Yaroslav Tykhiy2002-01-201-1/+1
| | | | Notes: svn path=/head/; revision=89585
* I've been meaning to do this for a while. Add an underscore to theMatthew Dillon2002-01-191-12/+12
| | | | | | | | | | | time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx() instead of time_to_xxx(), to make it more obvious that these are stopgap functions & placemarkers and not meant to create a defacto standard. They will eventually be replaced when a real standard comes out of committee. Notes: svn path=/head/; revision=89572
* Back out recent changesAndrey A. Chernov2002-01-192-31/+19
| | | | Notes: svn path=/head/; revision=89567
* If user not exist in OPIE system, return failure immediately insteadAndrey A. Chernov2002-01-191-1/+1
| | | | | | | | of producing fake prompts with random numbers which can be detected by potential intruder in two tries and totally confuse non-OPIE users. Notes: svn path=/head/; revision=89555
* Back out second right-now-expired password check in pam_sm_chauthtok,Andrey A. Chernov2002-01-191-2/+1
| | | | | | | old expired password assumed there Notes: svn path=/head/; revision=89554