Todd C. Miller
f1d0c99e03
Move bufsize_roundup() -> sudo_pow2_roundup() in libsudo_util.
2019-11-02 12:03:44 -06:00
Todd C. Miller
76eec78a33
Add basic support for event logging using a sudo-style log format.
2019-10-24 20:04:32 -06:00
Todd C. Miller
059b55ce72
Refactor code in sudoers that creates I/O log files to share with logsrvd.
2019-10-24 20:04:31 -06:00
Todd C. Miller
e0c9a9dfa3
Move mkdir_parents to libsudo_util.
2019-10-24 20:04:31 -06:00
Todd C. Miller
40bf4081be
Rename sudo_strtoid() to sudo_strtoidx() and add simplified sudo_strtoid()
2019-10-20 10:21:29 -06:00
Todd C. Miller
2512f6efbf
Use sudo_strtonum() explicitly instead of via a macro.
2019-10-14 10:09:30 -06:00
Todd C. Miller
9d8f374397
Add ssizeof macro that returns ssize_t.
...
We can use this instead of casting the result of size_t to int.
Also change checks for snprintf() returning <=0 to <0.
2019-06-25 09:45:10 -06:00
Todd C. Miller
1e1ef61902
Add SPDX-License-Identifier to files.
2019-04-29 07:21:51 -06:00
Todd C. Miller
716aa6e4ab
Support st_nmtime in struct stat as found in HP-UX.
2018-11-14 13:37:46 -07:00
Todd C. Miller
2121693879
Move definition of TIME_T_MAX to sudo_util.h
2018-09-24 14:21:58 -06:00
Todd C. Miller
b3227d3ed5
Add sudo_gettime_uptime() to measure time while not sleeping.
2018-08-19 09:55:08 -06:00
Todd C. Miller
0ae9662833
Add sudo_getgrouplist2() to dynamically allocate the group vector.
...
This allows us to avoid repeatedly calling getgrouplist() with
a statically sized vector on macOS, Solaris, HP-UX, and AIX.
2018-06-15 14:05:13 -06:00
Todd C. Miller
ff5ac3ef0e
Add tsdump, a simple utility to dump a timestamp file. To build,
...
run "make tsdump" in the plugins/sudoers directory (it is not built
by default). In order to map the tty device number to a name,
sudo_ttyname_dev() has been moved into libsudo_util.
2018-01-11 10:49:20 -07:00
Todd C. Miller
48fba3c2cc
update my email to Todd.Miller@sudo.ws
2017-12-03 17:53:40 -07:00
Todd C. Miller
5b86d2d298
Make sudo_parseln() flags hex to make it more obvious that they are
...
bit flags.
2016-09-01 14:36:24 -06:00
Todd C. Miller
2a4ba64c84
Add flag to sudo_parseln() to disable line continuation support.
2016-09-01 10:50:39 -06:00
Todd C. Miller
17ad75d50b
Add a flags option to sudo_parseln() and a flag to only mach comments
...
at the beginning of the line. Use the flag when parsing ldap.conf.
2016-09-01 09:19:20 -06:00
Todd C. Miller
6cbba7d665
Add an administrative domain to the passwd/group cache key for
...
AIX which can have different name <-> ID mappings depending
on whether the database is local, LDAP, etc.
2016-02-01 11:08:58 -07:00
Todd C. Miller
00142c91fa
Lock individual records in the timestamp file instead of the entire
...
file. This will make it possible for multiple sudo processes using
the same tty to serialize their timestamp lookups.
2015-09-07 06:06:08 -06:00
Todd C. Miller
a76b93e23a
Use our own bitmap macros instead of borrowing the ones from select.
2015-06-23 16:37:00 -06:00
Todd C. Miller
8d1708434f
Add sudo_strsplit(), similar to strtok_r() but non-destructive and
...
operates on non-C strings (requires a length parameter).
2015-05-26 15:46:41 -06:00
Todd C. Miller
05a01d4c5d
Avoid using a leading underbar in defines as they are reserved in
...
ISO C.
2015-05-21 11:13:20 -06:00
Todd C. Miller
9240018ce4
Avoid struct assignment when stashing mtime since AIX at least uses
...
a struct st_timespec that differs from struct timespec.
From Andrey Klyachkin.
2015-04-10 07:43:54 -06:00
Todd C. Miller
ee72cba937
Use futimens() and utimensat() instead of futimes() and utimes().
2015-03-02 13:58:50 -07:00
Todd C. Miller
be8dbeb22e
Avoid using HOST_NAME_MAX directly and use sysconf(_SC_HOST_NAME_MAX)
...
instead.
2015-02-19 20:28:02 -07:00
Todd C. Miller
8bc688188f
Move sudo_printf extern to sudo_util.h
2014-08-31 18:46:26 -06:00
Todd C. Miller
ecaecdc1f4
Merge secure_path.h -> sudo_util.h
2014-07-22 11:37:39 -06:00
Todd C. Miller
844a285391
Version the functions in libsudo_util
2014-07-22 11:26:17 -06:00
Todd C. Miller
a8fa112a53
atobool -> sudo_strtobool
...
atoid-> sudo_strtoid
atomode -> sudo_strtomode
2014-06-27 14:53:54 -06:00
Todd C. Miller
8e088e65c0
Split fileops.c into parseln.c and locking.c
2014-06-27 09:46:24 -06:00
Todd C. Miller
d36846a699
Reduce name space pollution in libsudo_util.so
2014-06-26 16:21:19 -06:00
Todd C. Miller
6bdee0488c
Rename parse_gid_list -> sudo_parse_gids to avoid namespace pollution.
2014-06-26 15:51:15 -06:00
Todd C. Miller
9ba5d82926
Rename fmt_string -> sudo_new_key_val to better describe its function.
2014-06-26 15:51:15 -06:00
Todd C. Miller
088edcb6f5
Add exported libsudo_util functions to util.exp and mark in headers
...
using __dso_public.
2014-06-26 15:51:15 -06:00
Todd C. Miller
250e8e750c
Don't call fatal/fatalx in common/*.c
2014-03-25 16:16:10 -06:00
Todd C. Miller
08af9d0516
Use bool for function return values instead of 1 or 0.
2014-02-04 15:18:16 -07:00
Todd C. Miller
d0f343ba2e
Move ctim_get and mtim_get to sudo_util.h
2014-01-31 15:43:34 -07:00
Todd C. Miller
659b1f0e34
Switch to new time stamp file format. Each user now has a single
...
file which may contain multiple records when per-tty time stamps
are in use (the default). The time stamps use a monotonic timer
where available and are once again stored in /var/run/sudo. The
lecture status is now stored separately from the time stamps in a
different directory.
2014-01-30 15:50:40 -07:00
Todd C. Miller
3e2d818ed9
Move prototypes for functions provided by libcommon that don't have
...
their own header files into sudo_util.h.
2013-12-12 18:29:07 -07:00