Merge MarkJ patches
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
PORTNAME= sssd
|
||||
PORTVERSION= 2.9.4
|
||||
PORTREVISION= 10
|
||||
PORTREVISION= 11
|
||||
CATEGORIES= security
|
||||
PKGNAMESUFFIX= 2
|
||||
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
diff --git src/providers/krb5/krb5_delayed_online_authentication.c src/providers/krb5/krb5_delayed_online_authentication.c
|
||||
index 1cb7eade0..4aaeb84b2 100644
|
||||
--- src/providers/krb5/krb5_delayed_online_authentication.c
|
||||
+++ src/providers/krb5/krb5_delayed_online_authentication.c
|
||||
@@ -328,6 +328,7 @@ errno_t init_delayed_online_authentication(struct krb5_ctx *krb5_ctx,
|
||||
struct tevent_context *ev)
|
||||
{
|
||||
int ret;
|
||||
+#ifdef __linux__
|
||||
hash_table_t *tmp_table;
|
||||
|
||||
ret = get_uid_table(krb5_ctx, &tmp_table);
|
||||
@@ -347,6 +348,7 @@ errno_t init_delayed_online_authentication(struct krb5_ctx *krb5_ctx,
|
||||
"hash_destroy failed [%s].\n", hash_error_string(ret));
|
||||
return EFAULT;
|
||||
}
|
||||
+#endif /* __linux__ */
|
||||
|
||||
krb5_ctx->deferred_auth_ctx = talloc_zero(krb5_ctx,
|
||||
struct deferred_auth_ctx);
|
||||
31
security/sssd2/files/patch-src_util_find__uid.c
Normal file
31
security/sssd2/files/patch-src_util_find__uid.c
Normal file
@ -0,0 +1,31 @@
|
||||
--- src/util/find_uid.c.orig 2024-05-17 14:50:42 UTC
|
||||
+++ src/util/find_uid.c
|
||||
@@ -71,7 +71,7 @@ static errno_t get_uid_from_pid(const pid_t pid, uid_t
|
||||
uint32_t num=0;
|
||||
errno_t error;
|
||||
|
||||
- ret = snprintf(path, PATHLEN, "/proc/%d/status", pid);
|
||||
+ ret = snprintf(path, PATHLEN, "/compat/linux/proc/%d/status", pid);
|
||||
if (ret < 0) {
|
||||
DEBUG(SSSDBG_CRIT_FAILURE, "snprintf failed\n");
|
||||
return EINVAL;
|
||||
@@ -240,7 +240,7 @@ static errno_t get_active_uid_linux(hash_table_t *tabl
|
||||
hash_key_t key;
|
||||
hash_value_t value;
|
||||
|
||||
- proc_dir = opendir("/proc");
|
||||
+ proc_dir = opendir("/compat/linux/proc");
|
||||
if (proc_dir == NULL) {
|
||||
ret = errno;
|
||||
DEBUG(SSSDBG_CRIT_FAILURE, "Cannot open proc dir.\n");
|
||||
@@ -327,9 +327,9 @@ errno_t get_uid_table(TALLOC_CTX *mem_ctx, hash_table_
|
||||
|
||||
errno_t get_uid_table(TALLOC_CTX *mem_ctx, hash_table_t **table)
|
||||
{
|
||||
-#ifdef __linux__
|
||||
int ret;
|
||||
|
||||
+#if 1
|
||||
ret = hash_create_ex(0, table, 0, 0, 0, 0,
|
||||
hash_talloc, hash_talloc_free, mem_ctx,
|
||||
NULL, NULL);
|
||||
@ -33,7 +33,7 @@ sssd_prestart()
|
||||
{
|
||||
|
||||
for i in db/sss/db db/sss/gpo_cache db/sss/keytabs db/sss/mc db/sss/pubconf/krb5.include.d/ db/sss/secrets log/sssd run/sss/pipes/private; do
|
||||
if [ ! -d var/${i} ]; then mkdir -p /var/${i}; fi
|
||||
if [ ! -d /var/${i} ]; then mkdir -p /var/${i}; fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user