+++ /dev/null
-^samba\.tests\.krb5\.pkinit_certificate_mapping_tests\.samba\.tests\.krb5\.pkinit_certificate_mapping_tests\.PkInitCertificateMappingTests\.test_object_sid\(ad_dc_ntvfs\)
-^samba\.tests\.krb5\.pkinit_certificate_mapping_tests\.samba\.tests\.krb5\.pkinit_certificate_mapping_tests\.PkInitCertificateMappingTests\.test_object_sid\(ad_dc_smb1\)
NTTIME acct_expiry;
NTSTATUS status;
bool protected_user = false;
- struct dom_sid sid;
uint32_t rid;
bool is_krbtgt = false;
bool is_rodc = false;
/* The lack of password controls etc applies to krbtgt by
* virtue of being that particular RID */
- ret = samdb_result_dom_sid_buf(msg, "objectSid", &sid);
+ ret = samdb_result_dom_sid_buf(msg, "objectSid", &entry->sid);
if (ret) {
goto out;
}
- status = dom_sid_split_rid(NULL, &sid, NULL, &rid);
+ status = dom_sid_split_rid(NULL, &entry->sid, NULL, &rid);
if (!NT_STATUS_IS_OK(status)) {
ret = EINVAL;
goto out;
#ifndef _KDC_SDB_H_
#define _KDC_SDB_H_
+#include "librpc/gen_ndr/security.h"
+
struct sdb_salt {
unsigned int type;
krb5_data salt;
struct SDBFlags flags;
struct sdb_pub_keys pub_keys;
struct sdb_certificate_mappings mappings;
+ struct dom_sid sid;
};
#define SDB_ERR_NOENTRY 36150275
#include <hdb.h>
#include <krb5.h>
#include <hx_locl.h>
+#include "libcli/security/dom_sid.h"
#include "rfc2459_asn1.h"
#include "sdb.h"
#include "sdb_hdb.h"
}
}
+ {
+ HDB_extension ext;
+ ObjectSid src_sid;
+ ObjectSid object_sid;
+ struct dom_sid_buf sid_buf;
+ char *sid_str = NULL;
+
+ sid_str = dom_sid_str_buf(&s->sid, &sid_buf);
+ if (sid_str == NULL) {
+ rc = ENOMEM;
+ goto error;
+ }
+
+ src_sid = (ObjectSid)
+ {
+ .data = sid_str,
+ .length = strlen(sid_str),
+ };
+
+ rc = der_copy_octet_string(&src_sid, &object_sid);
+ if (rc != 0) {
+ goto error;
+ }
+
+ ext = (HDB_extension){
+ .mandatory = FALSE,
+ .data = {
+ .element = choice_HDB_extension_data_object_sid,
+ .u.object_sid = object_sid,
+ }};
+
+ rc = hdb_replace_extension(context, h, &ext);
+ free_ObjectSid(&object_sid);
+ if (rc != 0) {
+ goto error;
+ }
+ }
+
h->context = ske;
if (ske != NULL) {
ske->kdc_entry = h;