Commit Graph

11 Commits

Author SHA1 Message Date
Todd C. Miller
134b2a4228 Rename emalloc2() -> emallocarray() and erealloc3() -> ereallocarray(). 2014-04-22 16:02:28 -06:00
Todd C. Miller
2508da6f68 Better match debugging.
Sprinkle const in match functions.
2013-12-05 14:34:56 -07:00
Todd C. Miller
07a804caf3 Quiet sign comparision warnings. 2013-10-23 15:03:31 -06:00
Todd C. Miller
9b2fb418ca Don't allow max_groups to be set to zero, it just complicates things
needlessly.  Fixes an assertion in visudo when there is a group-based
Defaults entry.
2013-08-12 09:14:38 -06:00
Todd C. Miller
6e50087010 Add sudo_set_grlist(), currently unused by the back end. 2013-03-26 13:27:51 -04:00
Todd C. Miller
593832152f Make sure groupname_len is at least 32 just to be on the safe side.
It is better to allocate a little extra and not need it than to
have to reallocate and start over.
2013-03-05 14:06:51 -05:00
Todd C. Miller
791b751425 Use sysconf(_SC_LOGIN_NAME_MAX) to find max username length instead
of poking around in struct utmpx.
2013-02-15 10:20:21 -05:00
Todd C. Miller
2d9da65881 #include "sudo_usage.h" not <sudo_usage.h> so we get the one in the
build directory and not the src dir when using a separate build
directory.
2013-02-15 08:57:21 -05:00
Todd C. Miller
d837700341 Use max_groups in front-end and plugin. 2013-02-14 15:52:27 -05:00
Todd C. Miller
1d7072fe09 Don't include <sys/param.h>. We only needed it for MAXPATHLEN,
MAXHOSTNAMELEN and the MIN/MAX macros.  We now use PATH_MAX and
HOST_NAME_MAX throughout without falling back on MAXPATHLEN or
MAXHOSTNAMELEN and define our own MIN/MAX macros as needed.
2012-12-04 10:40:47 -05:00
Todd C. Miller
883e0ec3cc Split out implementation-specific back end code out of pwutil.c
into pwutil_impl.c.  This will allow the main pwutil code to be
used for lookup methods other than getpw* and getgr*.
2012-09-21 16:25:01 -04:00