summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/os/kuserok.c
Commit message (Collapse)AuthorAgeFilesLines
* Add localauth pluggable interfaceGreg Hudson2013-03-091-203/+0
| | | | | | | | Add a new pluggable interface for local authorization, and replace the existing krb5_aname_to_localname and krb5_kuserok implementations with implementations based on the pluggable interface. ticket: 7583 (new)
* Adjust most C source files to match the new standards for copyrightGreg Hudson2011-03-091-5/+1
| | | | | | and license comments. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24695 dc483132-0cff-0310-8789-dd5450dbe970
* In the krb5_kuserok implementation, fix an unintentional type changeGreg Hudson2010-10-021-2/+2
| | | | | | | | | to "gobble" (was an int, was accidentally changed to a char) which could result in an infinite loop. ticket: 6792 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24413 dc483132-0cff-0310-8789-dd5450dbe970
* Implement k5login_directory and k5login_authoritative optionsGreg Hudson2010-10-011-85/+118
| | | | | | | | Add and document two new options for controlling k5login behavior. ticket: 6792 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24402 dc483132-0cff-0310-8789-dd5450dbe970
* make mark-cstyleTom Yu2009-10-311-41/+42
| | | | | | make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
* Revert the fopen part of the previous krb5_kuserok change, but keepGreg Hudson2009-02-171-5/+4
| | | | | | | the string-handling change. It introduced an unwanted behavior change when .k5login was detectable but unreadable. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22011 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_kuserok, just try opening .k5login; don't check ahead of timeGreg Hudson2009-02-171-9/+11
| | | | | | | whether it looks accessible. Also rewrite the construction of the .k5login filename to use snprintf instead of strnpy/strncat. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22010 dc483132-0cff-0310-8789-dd5450dbe970
* Set close-on-exec flag in most places where file descriptors areKen Raeburn2007-10-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | opened in our libraries (in case another application thread spawns a new process) and in the KDC programs (in case a plugin library spawns a new process). Checked calls to: open fopen THREEPARAMOPEN mkstemp socket accept dup dup2 pipe. In: util lib plugins kdc kadmin/server krb524. The various programs are less critical than the libraries, as any well-written plugin that spawns a new process should close all file descriptors it doesn't need to communicate with the new process. This approach also isn't bulletproof, as the call to set the close-on-exec flag is necessarily a separate call from creating the file descriptor, and the fork call could happen in between them. So plugins should be careful regardless of this patch; it will only reduce the window of potential lossage should a plugin be poorly written. (AFAIK there are currently no plugins that spawn processes where this would be a problem.) Update dependencies. ticket: 5561 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20143 dc483132-0cff-0310-8789-dd5450dbe970
* Fix stupid typo in last changeKen Raeburn2006-06-101-1/+1
| | | | | | ticket: 3233 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18104 dc483132-0cff-0310-8789-dd5450dbe970
* Use new macro FILE_OWNER_OK to examine uid of .k5login file.Ken Raeburn2006-06-101-1/+8
| | | | | | | | | On Mac, define this to accept UNKNOWNUID as well as 0. ticket: 3233 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18103 dc483132-0cff-0310-8789-dd5450dbe970
* * kuserok.c (krb5_kuserok): Use k5_getpwnam_rKen Raeburn2005-03-261-13/+1
| | | | | | | ticket: 2982 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17157 dc483132-0cff-0310-8789-dd5450dbe970
* Delete preprocessor tests for macintosh, __MWERKS__, applec, and THINK_C, allKen Raeburn2004-06-221-3/+3
| | | | | | | part of the pre-Mac OS X support. (Except the bits in the Yarrow code, where it was part of the upstream source.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16506 dc483132-0cff-0310-8789-dd5450dbe970
* * kuserok.c (krb5_kuserok): Handle draft POSIX versions of getpwnam_rKen Raeburn2004-06-041-2/+15
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16409 dc483132-0cff-0310-8789-dd5450dbe970
* protoizeKen Raeburn2002-09-031-4/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14816 dc483132-0cff-0310-8789-dd5450dbe970
* Danilo also says we can get rid of _MSDOS (Win16) tests, and explicit ↵Ken Raeburn2001-10-061-3/+3
| | | | | | FAR/NEAR specs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13786 dc483132-0cff-0310-8789-dd5450dbe970
* 2001-03-05 Sam Hartman <hartmans@mit.edu>Sam Hartman2001-03-051-1/+1
| | | | | | | | | * kuserok.c: Set max_username to 65 not 10. 65 should be enough for a null terminated string from most current Unixes usernames. The previous limit of 10 was too low. I don't know how the previous limit was chosen nor why this is not a dynamic buffer. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13054 dc483132-0cff-0310-8789-dd5450dbe970
* pullup from 1.2 branchKen Raeburn2000-06-271-2/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12442 dc483132-0cff-0310-8789-dd5450dbe970
* copyright notice updates from 1.1 branchKen Raeburn1999-09-241-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11853 dc483132-0cff-0310-8789-dd5450dbe970
* from 1.1 branchKen Raeburn1999-09-021-3/+3
| | | | | | | | | | | | | | | | | | | 1999-09-01 Danilo Almeida <dalmeida@mit.edu> * kuserok.c (krb5_kuserok): Fix improper negation in non-Unix localname check. Also fix calling convention before this function is exported by the Windows DLL. * localaddr.c (krb5_os_localaddr): Fix memset to clear right address list. (Thanks to jaltman@columbia.edu). 1999-09-01 Ken Raeburn <raeburn@mit.edu> * get_krbhst.c (krb5_get_krbhst): Fix double-indirection confusion. Do actually copy string contents to newly allocated storage. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11780 dc483132-0cff-0310-8789-dd5450dbe970
* Replaced preprocessor symbol _MACINTOSH with macintosh, since macintosh is ↵Miro Jurisic1998-07-171-1/+1
| | | | | | the standard symbol defined by all Mac compiler (oh, sure, it doesn't have _. but at least it's always there) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10653 dc483132-0cff-0310-8789-dd5450dbe970
* net_read.c (krb5_net_read):Theodore Tso1996-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | net_write.c (krb5_net_write): In case of an error, on Windows machines, set errno from SOCKET_ERRNO, since the interface assumes the error is passed back the errno global varaible. This really needs to be fixed sometime... read_msg.c: If ECONNABORTED is not defined, try using the Winsock version of the error code (WSAECONNABORTED). read_pwd.c: promptusr.c: lock_file.c: kuserok.c: ktdefname.c (krb5_kt_default_name): init_os_ctx.c (os_init_paths): ccdefname.c: an_to_ln.c (db_an_to_ln): Change _WINDOWS to _MSDOS, and add check for _WIN32. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8316 dc483132-0cff-0310-8789-dd5450dbe970
* first pass attempt at cleaning up some gcc -Wall flamesTom Yu1995-08-051-1/+1
| | | | | | (see ChangeLogs for gory details) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6424 dc483132-0cff-0310-8789-dd5450dbe970
* Changes for Macintosh implementationKeith Vetter1995-07-061-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6229 dc483132-0cff-0310-8789-dd5450dbe970
* Windows global stuff:Keith Vetter1995-04-141-1/+1
| | | | | | | | | o removed INTERFACE from non-api functions o add FAR to pointers visible to the world o made the tests for __STDC__ also check for _WINDOWS o creates GSSAPI.DLL & GSSAPI.LIB as per spec. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5354 dc483132-0cff-0310-8789-dd5450dbe970
* Added prototypes to ccache change notificationKeith Vetter1995-03-221-1/+24
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5198 dc483132-0cff-0310-8789-dd5450dbe970
* Port of most of the OS directory to the PCKeith Vetter1995-03-071-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5079 dc483132-0cff-0310-8789-dd5450dbe970
* Avoid <krb5/...> includesJohn Gilmore1995-02-281-7/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5014 dc483132-0cff-0310-8789-dd5450dbe970
* Removed all references to DECLARG and OLDDECLARG.Chris Provenzano1995-01-131-5/+6
| | | | | | | | | Added krb5_context to all krb5_routines. Moved init_ctx.c to init_os_ctx.c because a library cannot have more than on file with the same name. See krb5/krb/init_ctx.c git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4811 dc483132-0cff-0310-8789-dd5450dbe970
* stamp out rcs keywordsMark Eichin1994-08-181-6/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4191 dc483132-0cff-0310-8789-dd5450dbe970
* Changes from jik so that the .k5login file is honored even if it isTheodore Tso1993-09-011-7/+7
| | | | | | owned by root. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2642 dc483132-0cff-0310-8789-dd5450dbe970
* Change export warning notice from "is assumed to require an export license"Theodore Tso1993-09-011-2/+2
| | | | | | to "may require..." git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2638 dc483132-0cff-0310-8789-dd5450dbe970
* Need to include osconf.h for porting to LinuxTheodore Tso1993-07-291-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2626 dc483132-0cff-0310-8789-dd5450dbe970
* AIX 3.1 support: work around include file bug; include <sys/access.h>John Carr1992-02-231-0/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2230 dc483132-0cff-0310-8789-dd5450dbe970
* Update copyright noticeJohn Kohl1991-06-061-2/+16
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2156 dc483132-0cff-0310-8789-dd5450dbe970
* libos-proto.h -> los-proto.hJohn Kohl1991-03-141-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1916 dc483132-0cff-0310-8789-dd5450dbe970
* fix copyrightsJohn Kohl1991-03-051-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1857 dc483132-0cff-0310-8789-dd5450dbe970
* change index/rindex to strchr/strrchrJohn Kohl1990-10-291-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1361 dc483132-0cff-0310-8789-dd5450dbe970
* fix up include filesJohn Kohl1990-05-231-5/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@915 dc483132-0cff-0310-8789-dd5450dbe970
* clean up some nitsJohn Kohl1990-05-161-8/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@861 dc483132-0cff-0310-8789-dd5450dbe970
* *** empty log message ***John Kohl1990-05-161-0/+130
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@860 dc483132-0cff-0310-8789-dd5450dbe970