[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Thu Jan 19 09:25:01 UTC 2023
The branch, master has been updated
via 872ea49ac6d kdc: Don't reference ENODATA in platform-independent code
from 84f56f2b98b ldb: change the version to 2.8.0 for Samba 4.19
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 872ea49ac6dced44f114f80b7065017a381f46d7
Author: Volker Lendecke <vl at samba.org>
Date: Wed Jan 18 11:49:00 2023 +0100
kdc: Don't reference ENODATA in platform-independent code
FreeBSD has ENOATTR but not ENODATA, Linux has ENODATA but not ENOATTR for
returning "attr does not exist". With 2eb899de6a2 we settled on ENOATTR to
handle this case.
Alternatively we could
#define ENODATA ENOATTR
on FreeBSD...
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: douglas.bagnall at catalyst.net.nz
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Thu Jan 19 09:24:15 UTC 2023 on atb-devel-224
-----------------------------------------------------------------------
Summary of changes:
source4/kdc/mit_samba.c | 5 +++--
source4/kdc/pac-glue.c | 7 ++++---
source4/kdc/wdc-samba4.c | 3 ++-
3 files changed, 9 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/kdc/mit_samba.c b/source4/kdc/mit_samba.c
index 54d308d35e8..8df3ad36228 100644
--- a/source4/kdc/mit_samba.c
+++ b/source4/kdc/mit_samba.c
@@ -25,6 +25,7 @@
#include "param/param.h"
#include "dsdb/samdb/samdb.h"
#include "system/kerberos.h"
+#include "lib/replace/system/filesys.h"
#include <com_err.h>
#include <kdb.h>
#include <kadm5/kadm_err.h>
@@ -640,7 +641,7 @@ krb5_error_code mit_samba_reget_pac(struct mit_samba_context *ctx,
new_pac);
if (code != 0) {
krb5_pac_free(context, new_pac);
- if (code == ENODATA) {
+ if (code == ENOATTR) {
krb5_pac_free(context, *pac);
*pac = NULL;
code = 0;
@@ -740,7 +741,7 @@ krb5_error_code mit_samba_update_pac(struct mit_samba_context *ctx,
old_pac,
new_pac);
if (code != 0) {
- if (code == ENODATA) {
+ if (code == ENOATTR) {
/*
* We can't tell the KDC to not issue a PAC. It will
* just return the newly allocated empty PAC.
diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c
index f844b08d513..e9b951ff48e 100644
--- a/source4/kdc/pac-glue.c
+++ b/source4/kdc/pac-glue.c
@@ -23,6 +23,7 @@
#include "lib/replace/replace.h"
#include "lib/replace/system/kerberos.h"
+#include "lib/replace/system/filesys.h"
#include "lib/util/debug.h"
#include "lib/util/samba_util.h"
#include "lib/util/talloc_stack.h"
@@ -1401,7 +1402,7 @@ WERROR samba_rodc_confirm_user_is_allowed(uint32_t num_object_sids,
* @param new_pac The new already allocated PAC
* @return A Kerberos error code. If no PAC should be returned, the code will be
- * ENODATA!
+ * ENOATTR!
*/
krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx,
krb5_context context,
@@ -1756,7 +1757,7 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx,
* need to re-generate anything anyway.
*/
if (!samba_princ_needs_pac(server)) {
- code = ENODATA;
+ code = ENOATTR;
goto done;
}
@@ -1779,7 +1780,7 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx,
&requested_pac);
if (code != 0 || !requested_pac) {
if (!requested_pac) {
- code = ENODATA;
+ code = ENOATTR;
}
goto done;
}
diff --git a/source4/kdc/wdc-samba4.c b/source4/kdc/wdc-samba4.c
index 1c10f13972f..f3ca04550b0 100644
--- a/source4/kdc/wdc-samba4.c
+++ b/source4/kdc/wdc-samba4.c
@@ -29,6 +29,7 @@
#include "sdb_hdb.h"
#include "librpc/gen_ndr/auth.h"
#include <krb5_locl.h>
+#include "lib/replace/system/filesys.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_KERBEROS
@@ -361,7 +362,7 @@ static krb5_error_code samba_wdc_reget_pac2(astgs_request_t r,
new_pac);
if (ret != 0) {
krb5_pac_free(context, new_pac);
- if (ret == ENODATA) {
+ if (ret == ENOATTR) {
krb5_pac_free(context, *pac);
*pac = NULL;
ret = 0;
--
Samba Shared Repository
More information about the samba-cvs
mailing list