]> git.proxmox.com Git - pve-access-control.git/commit
jobs: realm sync: fix scheduled LDAP syncs not applying attributes correctly
authorChristoph Heiss <c.heiss@proxmox.com>
Tue, 19 Mar 2024 13:48:43 +0000 (14:48 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 22 Mar 2024 10:48:31 +0000 (11:48 +0100)
commitbb34ca534e44b3cf91b8ae34a204aba499dcfe90
treeb9aa2d3ce12e076eaca1be804f01b99146d3812e
parent5bcf553e3a193a537d92498f4fee3c23e22d1741
jobs: realm sync: fix scheduled LDAP syncs not applying attributes correctly

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/

Fixes: cb93636 ("LDAP sync: improve validation of synced attributes")
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
Tested-by: Fiona Ebner <f.ebner@proxmox.com>
src/PVE/Jobs/RealmSync.pm