Nicolas Williams
7138a04690
Fix rk_mkdir() on WIN32
2018-12-25 22:11:19 -06:00
Luke Howard
6341132175
roken: fix build breakage, AT_HWCAP2 may be undefined ( #446 )
2018-12-23 06:44:50 +00:00
Luke Howard
2974a9841f
roken: skip AT_HWCAP[2] in auxval test ( #446 )
...
AT_HWCAP and AT_HWCAP2 are handled specially by libc and cannot be parsed
directly out of /proc/self/auxv. Skip them in the auxval test.
2018-12-23 06:16:05 +00:00
Luke Howard
dd7eb8f665
roken: add rk_getpwuid_r()
...
TODO: implement non-POSIX getpwnam_r()/getpwuid_r() wrappers
2018-12-22 16:30:34 +11:00
Luke Howard
ec88576ace
roken: Solaris auxval test fails ( #441 )
...
The Solaris auxval test fails, because Solaris uses different preprocessor
symbols (and numbers) for its UID and GID auxval types.
Note that issuid() could simply be an alias of issetugid() on Solaris, so
perhaps this is not necessary.
2018-12-19 09:51:12 +11:00
Rod Widdowson
136f8fb550
Windows: Avoid using deprecated function.
...
In VC15 GetVersionEx has been deprecated. In order to continue to
support Win2K use the undeprecated VerifyVersionInfoW API
(available since Win2K).
Inline helper functions used in latest Win10 SDK to simplify code.
2018-12-14 06:38:59 -05:00
Jeffrey Altman
1feff82129
roken: gettimeofday using GetSystemTimePreciseAsFileTime
...
GetSystemTimeAsFileTime() has 16ms precision.
GetSystemTimePreciseAsFileTime() has <1ns precision but is only available
on Windows 8 or later.
This change dynamically loads GetSystemTimePreciseAsFileTime() if it is
available.
Change-Id: Ib9c616c01948384e6b256ac9b6023f1e39673613
2018-09-19 00:30:42 -04:00
Daria Phoebe Brashear
7333c2c945
roken: parse_units returns void
...
despite the fact that the called function returns void,
returning a result here throws an error with solaris cc.
just call the function and don't return
2018-04-19 13:12:59 -04:00
Jeffrey Altman
dcc880cf7c
roken: issuid always call rk_getauxval
...
Instead of calling getauxval(), always call rk_getauxval() to ensure consistent behavior within roken.
2018-04-04 12:54:13 -04:00
Daria Phoebe Brashear
6aece8ea06
getauxval: fall through to auxv gfter getauxval errno test
...
if when we need to determine if getauxval sets errno, we determine it doesn't
after getting a 0 return code, make sure we return a value, since we didn't
previously. fall through to code we'd otherwise have called in this case
above.
2018-04-04 12:54:13 -04:00
Jeffrey Altman
7ee3cc6855
Update parse_units.c
2018-04-04 11:27:23 -04:00
Harald Barth
7a2767e610
Make parse_units() handle trailing whitespace
...
Skipping any trailing whitespace characters
2018-04-04 11:27:23 -04:00
Viktor Dukhovni
b860b70ada
Fix missing rk_ prefix
2017-10-17 03:11:55 -04:00
Nicolas Williams
496022fa37
Fix lib/roken parse_* warnings
2017-10-11 16:45:51 -05:00
David Mulder
2548b3b8aa
Solaris 8 x86 uses ->d_fd not ->dd_fd or dirfd()
2017-09-25 18:26:35 -05:00
Roland C. Dowdeswell
8c18131c13
Have roken.h #include <util.h> to find emalloc on some platforms.
2017-09-25 18:01:19 -05:00
Viktor Dukhovni
aef3843b55
Add missing semicolons
2017-08-23 17:06:29 -04:00
Viktor Dukhovni
d73ec2510a
Try to avoid parse_{time,units,flags} symbol conflicts
...
On Debian stretch systems PAM modules linked against Heimdal run into
symbol conflicts with parse_time() in systemd libraries. We redefine
parse_time() and friends to rk_parse_time(), ... while keeping the old
names for ABI compatibility with existing clients.
The legacy names should eventually be droppped.
2017-08-23 15:09:11 -05:00
Nicolas Williams
2c913b4bf7
Fix typo in d999ac7
2017-05-29 00:49:58 -05:00
Nicolas Williams
d999ac7026
Quiet warning about rk_getprocauxval()
2017-05-28 16:58:38 -05:00
Viktor Dukhovni
2d968c5c88
Fix test-auxval typos hidden by platform dependence
2017-05-27 00:08:00 -05:00
Nicolas Williams
123f702001
lib/roken: add fseeko()/ftello()
2017-05-26 23:24:30 -04:00
Nicolas Williams
4a9591af92
Quiet windows warning about struct passwd
2017-05-26 23:24:30 -04:00
Nicolas Williams
28934a3bc8
Revert "roken: refactor rk_getauxval"; broke build
...
This reverts commit cb1ab5b5fc
.
2017-05-16 13:05:20 -05:00
Jeffrey Altman
cb1ab5b5fc
roken: refactor rk_getauxval
...
Refactor rk_getauxval() to remove duplicate code and to ensure
that a value is always returned.
Change-Id: I3b452dbc11802169e2c96e7ad16e714e7a880450
2017-04-29 13:55:25 -04:00
Jeffrey Altman
18f3115f78
roken: fix rk_getauxval missing stack variable
...
if defined(HAVE_GETAUXVAL) && !defined(GETAUXVAL_SETS_ERRNO) the
stack variable declaration for 'a' is missing:
const auxv_t *a
Declare 'a' so that Heimdal can build again.
Change-Id: If64dd497f240688b76f3dd6139ac68c2ff149a0e
2017-04-29 01:05:57 -04:00
Nicolas Williams
7dfad1ab0b
Use secure_getenv() instead of issuid()
2017-04-17 18:02:30 -04:00
Nicolas Williams
cf4efe8de6
Add secure_getenv.c
2017-04-17 18:02:30 -04:00
Nicolas Williams
90110f5553
Revamp issuid()
2017-04-17 18:02:30 -04:00
Nicolas Williams
650ffdc964
Revamp lib/roken/getauxval.c
2017-04-17 18:02:30 -04:00
Nicolas Williams
f867a12aa9
Test rk_get*auxval()
2017-03-31 18:56:04 -05:00
Nicolas Williams
707b2372d2
Further improvements to issuid()
2017-03-31 18:56:04 -05:00
Nicolas Williams
6a0f45c4d7
Use __attribute__ ((__name__)) form
...
Protect against macros named noreturn and so on.
2017-03-13 18:39:41 -04:00
Jeffrey Altman
c7129a9562
roken: pidfile -> rk_pidfile
...
Commit 7dc4481ed2
which changed from
pidfile -> rk_pidfile was incomplete. Must handle the NO_PIDFILE case.
Change-Id: Ifc0b135e1fa7abdf4e370ad4b8fe2eb1305760f5
2017-01-20 17:54:12 -05:00
Viktor Dukhovni
f1bc9f2ff9
Avoid pidfile() missing prototype warnings
2016-12-19 20:55:08 -05:00
Viktor Dukhovni
7dc4481ed2
Avoid interposing pidfile(), use rk_pidfile() instead
2016-12-19 19:10:49 -05:00
Nicolas Williams
63f22421c8
Fix lib/roken can't find pidfile() ( #230 )
2016-12-16 12:05:51 -06:00
Nicolas Williams
3e65dfbc32
Fix make dist missing files ( #228 )
2016-12-15 12:15:56 -06:00
Viktor Dukhovni
a1c505309c
More extensive SRV order tests
...
Based largely on initial version by Nico.
2016-12-12 19:42:11 -05:00
Viktor Dukhovni
32f8564296
Fix incorrect scaling of weight 0 SRV records
...
Loosely based on patch by Nico.
2016-12-12 17:51:13 -05:00
Nicolas Williams
87b234e154
roken_detach_prep() close pipe
2016-12-06 22:44:23 -06:00
Nicolas Williams
d609264a00
Only rm pidfile if PID matches
2016-12-06 22:44:23 -06:00
Nicolas Williams
a6e8ff2ae5
pidfile(): write newline too
2016-12-06 22:44:23 -06:00
Nicolas Williams
12eb54d03f
rk_pidfile() should call pidfile() if HAVE_PIDFILE
...
This is necessary so we can use --detach in tests even on NetBSD and
OpenBSD.
2016-12-06 22:44:23 -06:00
Jeffrey Altman
2f62c7c77e
roken: rk_undumpdata free allocation on error
...
Do not return allocated memory and an error code.
Free it instead so as to avoid memory leaks.
Change-Id: I47d42be0f6bc52062c57c00c37b665ee2f2811ce
2016-11-19 02:08:58 -05:00
Nicolas Williams
1c81ddf4e2
Round #2 of scan-build warnings cleanup
2016-11-16 17:03:14 -06:00
Nicolas Williams
953dc07391
Round #1 of scan-build warnings cleanup
2016-11-15 21:27:20 -06:00
Viktor Dukhovni
da8052fefc
Don't scale SRV weights when none have weight zero
2016-11-13 15:22:17 +11:00
Viktor Dukhovni
ee8b2b4253
Drop code that's been dead for 10 years or more
2016-11-13 05:36:11 +11:00
Viktor Dukhovni
c8753450b1
Fix (linux) compiler warnings in libroken
2016-11-13 03:41:33 +11:00