mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
third_party/heimdal_build: Determine whether time_t is signed
Without this, Heimdal will assume time_t is unsigned, and a wrong assumption will cause 'infinite' ticket lifetimes to be reckoned as from the past, and thus requests will fail with KDC_ERR_NEVER_VALID. This is an adaptation to Heimdal: commit 9ae9902249732237aa1711591604a6adf24963fe Author: Nicolas Williams <nico@twosigma.com> Date: Tue Feb 15 17:01:00 2022 -0600 cf: Check if time_t is signed BUG: https://bugzilla.samba.org/show_bug.cgi?id=14995 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Mar 1 18:07:50 UTC 2022 on sn-devel-184 (cherry picked from commit 9eb27f296ae2b797803fffbb7f4cb34d8eb06f34)
This commit is contained in:
parent
97011aa3ce
commit
947ad1581a
@ -343,6 +343,23 @@ def CHECK_SIZEOF(conf, vars, headers=None, define=None, critical=True):
|
||||
sys.exit(1)
|
||||
return ret
|
||||
|
||||
@conf
|
||||
def CHECK_SIGN(conf, v, headers=None):
|
||||
'''check the sign of a type'''
|
||||
define_name = v.upper().replace(' ', '_')
|
||||
for op, signed in [('<', 'signed'),
|
||||
('>', 'unsigned')]:
|
||||
if CHECK_CODE(conf,
|
||||
f'static int test_array[1 - 2 * !((({v})-1) {op} 0)];',
|
||||
define=f'{define_name}_{signed.upper()}',
|
||||
quote=False,
|
||||
headers=headers,
|
||||
local_include=False,
|
||||
msg=f"Checking if '{v}' is {signed}"):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
@conf
|
||||
def CHECK_VALUEOF(conf, v, headers=None, define=None):
|
||||
'''check the value of a variable/define'''
|
||||
|
2
third_party/heimdal_build/wscript_configure
vendored
2
third_party/heimdal_build/wscript_configure
vendored
@ -206,3 +206,5 @@ if conf.CONFIG_SET('USING_EMBEDDED_HEIMDAL'):
|
||||
conf.define('HAVE_KRB5_ADDLOG_FUNC_NEED_CONTEXT', 1)
|
||||
else:
|
||||
pass # TODO
|
||||
|
||||
conf.CHECK_SIGN('time_t')
|
||||
|
Loading…
x
Reference in New Issue
Block a user