Bug 28999 - Possible conflicts in mapping of SambaSIDs to UID/GIDs and back
Possible conflicts in mapping of SambaSIDs to UID/GIDs and back
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UMC - Groups
UCS 4.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-31 12:07 CET by Arvid Requate
Modified: 2020-07-03 20:56 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.057
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2012-10-31 12:07:27 CET
Samba4 verwendet Windows Security-Descriptoren, insbesondere in NTACLs, in denen Gruppen als Besitzer eines Objekts auftreten können. Für die Abbildung auf Posix-IDs verwendet Samba4 die Mapping-Einträge aus der idmap.ldb. Die Einträge haben einen bestimmten Typ: ID_TYPE_UID, ID_TYPE_GID oder ID_TYPE_BOTH. Samba4 verwendet ID_TYPE_BOTH für SID/Posix-ID Mappings von Gruppen, damit sie auch als valide Besitzer akzeptiert werden.

Bei der Abbildung auf Posix-IDs, z.B. bei Dateiberechtigungen, wird dann eine Posix-ID einer Gruppe im Besitzer-Attribut verwendet. Wenn die entsprechende Posix-ID eindeutig nur für die Gruppe vergeben ist, dann sieht das im Effekt so aus, dass die Besitzer-UID nicht in einen Namen aufgelöst wird:

drwxrwx---+ 4 5000 Domain Users 4096 30. Okt 13:00 /var/lib/samba/sysvol/arucs31i5.qa/Policies/{31B2F340-016D-11D2-945F-00C04FB984F9}

Problematisch wird es, wenn einem anderen Benutzer der gleiche Wert als UID zugeordnet ist, denn dann ist 1. dieser unerwartet Besitzer der Datei und 2. könnte es möglicherweise zu Problemen bei dem Zugriff durch die Gruppe kommen (ggf. geht hier auch einfach alles weiter gut).

Eine Lösung wäre, die Module users/user und groups/group nicht-überschneidende ID-Bereiche vergeben zu lassen, z.B. ungerade für die Guppen und gerade für Benutzer. Hier ist allerdings vermutlich das Update-Szenario nur sehr schwer realisierbar. Andererseits könnte es sinnvoll sein, die Vergabestrategie für UIDs und GIDs zeitnah zu ändern, sodass möglichst wenige Überschneidungen auftreten und man ggf. hier mittelfristig Probleme vermeidet.

Die aktuelle Situation erschwert eine Lösung für Bug #28737.

+++ This bug was initially created as a clone of Bug #28737 +++
Comment 1 Arvid Requate univentionstaff 2012-10-31 12:12:22 CET
Note: Aktuell schreiben wir per samba4-idmap keine ID_TYPE_BOTH, daher ist das hier beschriebene Problem in dieser Form aktuell nicht im Produkt. Im Produkt (Stand UCS 3.1 interim-2) kann man nur keine Gruppen als Besitzer in NTACLs eintragen, weil sie in der idmap.ldb keine validen Benutzer sind (siehe z.B. Bug #28737, vermutlich aber auch nicht vom Windows-Client aus).
Comment 2 Jan Christoph Ebersbach univentionstaff 2014-05-14 17:37:31 CEST
A conflict in uid/gid number that was caused by this bug was reported by a UCS@school customer.  As a workaround we changed the gid numbers of the internal Samba objects to a value below 5000 to avoid further conflicts.
Comment 3 Stefan Gohmann univentionstaff 2017-06-16 20:41:01 CEST
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4.

If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
Comment 4 Ingo Steuwer univentionstaff 2020-07-03 20:56:17 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.