From: Christoph Heiss <c.heiss@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH access-control] jobs: realm sync: fix scheduled LDAP syncs not applying attributes correctly
Date: Tue, 19 Mar 2024 14:48:43 +0100 [thread overview]
Message-ID: <20240319134851.747097-1-c.heiss@proxmox.com> (raw)
This was reported by a user in the forum [0].
The cause was that the user-* standard options were not registered when
the sync was called from the scheduler, resulting in the following
error:
pvescheduler[2849]: skipping attribute mapping 'cn'->'comment' for user 'test@samba0' - no such standard option 'user-comment'
Fix this by simply importing the PVE::API2::User module, thus ensuring
the options get registered.
[0] https://forum.proxmox.com/threads/ldap-integration-comment-email-first-name-lastname.143490/
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
src/PVE/Jobs/RealmSync.pm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/PVE/Jobs/RealmSync.pm b/src/PVE/Jobs/RealmSync.pm
index 91235d5..4c77e55 100644
--- a/src/PVE/Jobs/RealmSync.pm
+++ b/src/PVE/Jobs/RealmSync.pm
@@ -13,6 +13,9 @@ use PVE::Tools ();
use PVE::API2::Domains ();
+# load user-* standard options
+use PVE::API2::User ();
+
use base qw(PVE::Job::Registry);
sub type {
--
2.43.1
next reply other threads:[~2024-03-19 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 13:48 Christoph Heiss [this message]
2024-03-19 14:57 ` Fiona Ebner
2024-03-21 9:33 ` Christoph Heiss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240319134851.747097-1-c.heiss@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.