]>
git.ipfire.org Git - thirdparty/samba.git/log
Samuel Cabrero [Mon, 6 Feb 2023 18:06:43 +0000 (19:06 +0100)]
winbind:varlink: Implement membership by group and user names
$> varlink call -m unix:/run/systemd/userdb/org.samba.winbind/io.systemd.UserDatabase.GetMemberships "{\"service\":\"org.samba.winbind\",\"groupName\":\"AFOREST+domain users\",\"userName\":\"AFOREST+user1\"}"
{
"groupName": "AFOREST+domain users",
"userName": "AFOREST+user1"
}
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 18:03:03 +0000 (19:03 +0100)]
winbind:varlink: Implement memberships by group name
$> userdbctl -s org.samba.winbind users-in-group "AFOREST+domain users"
Enabled services: org.samba.winbind
USER GROUP
AFOREST+administrator AFOREST+domain users
AFOREST+krbtgt AFOREST+domain users
AFOREST+user1 AFOREST+domain users
3 memberships listed.
$> SYSTEMD_LOG_LEVEL=7 getent -sgroup:systemd group "AFOREST+domain users"
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetGroupRecord","parameters":{"groupName":"AFOREST+domain users","service":"org.samba.winbind"}}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":20513,"groupName":"AFOREST+domain users","members":["AFOREST+administrator","AFOREST+user1","AFOREST+krbtgt"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+domain users","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"groupName":"AFOREST+domain users","userName":"AFOREST+administrator"}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"groupName":"AFOREST+domain users","userName":"AFOREST+user1"}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"groupName":"AFOREST+domain users","userName":"AFOREST+krbtgt"}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain users:x:20513:AFOREST+administrator,AFOREST+user1,AFOREST+krbtgt
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:58:25 +0000 (18:58 +0100)]
winbind:varlink: Implement memberships by user
$> userdbctl -s org.samba.winbind groups-of-user AFOREST+user1
Enabled services: org.samba.winbind
USER GROUP
AFOREST+user1 AFOREST+domain users
AFOREST+user1 AFOREST+user1
2 memberships listed.
$> SYSTEMD_LOG_LEVEL=7 getent -sinitgroups:systemd initgroups "AFOREST+domain users"
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"userName":"AFOREST+domain users","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"groupName":"AFOREST+domain users","userName":"AFOREST+domain users"}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
Failed to connect to /run/systemd/userdb/io.systemd.Multiplexer: No such file or directory
Unable to connect to /run/systemd/userdb/io.systemd.Multiplexer: No such file or directory
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetGroupRecord","parameters":{"groupName":"AFOREST+domain users","service":"org.samba.winbind"}}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":20513,"groupName":"AFOREST+domain users","members":["AFOREST+administrator","AFOREST+user1","AFOREST+krbtgt"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"groupName":"AFOREST+domain users","userName":"AFOREST+domain users"}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
Failed to connect to /run/systemd/userdb/io.systemd.Multiplexer: No such file or directory
Unable to connect to /run/systemd/userdb/io.systemd.Multiplexer: No such file or directory
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetGroupRecord","parameters":{"groupName":"AFOREST+domain users","service":"org.samba.winbind"}}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":20513,"groupName":"AFOREST+domain users","members":["AFOREST+administrator","AFOREST+user1","AFOREST+krbtgt"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain users 20513 20513
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:49:07 +0000 (18:49 +0100)]
winbind:varlink: Implement memberships enumeration
$> varlink call -m unix:/run/systemd/userdb/org.samba.winbind/io.systemd.UserDatabase.GetMemberships "{\"service\":\"org.samba.winbind\"}"
{
"groupName": "AFOREST+schema admins",
"userName": "AFOREST+administrator"
}
{
"groupName": "AFOREST+enterprise admins",
"userName": "AFOREST+administrator"
}
{
"groupName": "AFOREST+domain admins",
"userName": "AFOREST+administrator"
}
{
"groupName": "AFOREST+domain users",
"userName": "AFOREST+administrator"
}
{
"groupName": "AFOREST+domain users",
"userName": "AFOREST+user1"
}
{
"groupName": "AFOREST+domain users",
"userName": "AFOREST+krbtgt"
}
{
"groupName": "AFOREST+domain guests",
"userName": "AFOREST+guest"
}
{
"groupName": "AFOREST+group policy creator owners",
"userName": "AFOREST+administrator"
}
{
"groupName": "AFOREST+denied rodc password replication group",
"userName": "AFOREST+krbtgt"
}
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:39:46 +0000 (18:39 +0100)]
winbind:varlink: Implement get group record by name and gid
$> varlink call -m unix:/run/systemd/userdb/org.samba.winbind/io.systemd.UserDatabase.GetGroupRecord "{\"service\":\"org.samba.winbind\",\"gid\":20513,\"groupName\":\"AFOREST+domain users\"}"
{
"incomplete": false,
"record": {
"gid": 20513,
"groupName": "AFOREST+domain users",
"members": [
"AFOREST+administrator",
"AFOREST+user1",
"AFOREST+krbtgt"
],
"service": "org.samba.winbind"
}
}
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:35:29 +0000 (18:35 +0100)]
winbind:varlink: Implement get group record by name
$> userdbctl -s org.samba.winbind group "AFOREST+domain users"
Enabled services: org.samba.winbind
Group name: AFOREST+domain users
Disposition: regular
GID: 20513
Service: org.samba.winbind
$> SYSTEMD_LOG_LEVEL=7 getent -sgroup:systemd group "AFOREST+domain users"
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetGroupRecord","parameters":{"groupName":"AFOREST+domain users","service":"org.samba.winbind"}}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":20513,"groupName":"AFOREST+domain users","members":["AFOREST+administrator","AFOREST+user1","AFOREST+krbtgt"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+domain users","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain users:x:20513:AFOREST+administrator,AFOREST+user1,AFOREST+krbtgt
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:34:04 +0000 (18:34 +0100)]
winbind:varlink: Implement get group record by gid
$> userdbctl -s org.samba.winbind group 20513
Enabled services: org.samba.winbind
Group name: AFOREST+domain users
Disposition: regular
GID: 20513
Service: org.samba.winbind
$> SYSTEMD_LOG_LEVEL=7 getent -sgroup:systemd group 20513
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetGroupRecord","parameters":{"gid":20513,"service":"org.samba.winbind"}}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":20513,"groupName":"AFOREST+domain users","members":["AFOREST+administrator","AFOREST+user1","AFOREST+krbtgt"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+domain users","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain users:x:20513:AFOREST+administrator,AFOREST+user1,AFOREST+krbtgt
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:32:21 +0000 (18:32 +0100)]
winbind:varlink: Implement group record enumeration
$> userdbctl -s org.samba.winbind group
NAME DISPOSITION GID DESCRIPTION
...
AFOREST+enterprise read-only domain controllers regular 20498 -
AFOREST+domain admins regular 20512 -
AFOREST+domain users regular 20513 -
AFOREST+domain guests regular 20514 -
AFOREST+domain computers regular 20515 -
AFOREST+domain controllers regular 20516 -
AFOREST+cert publishers regular 20517 -
AFOREST+schema admins regular 20518 -
AFOREST+enterprise admins regular 20519 -
AFOREST+group policy creator owners regular 20520 -
AFOREST+read-only domain controllers regular 20521 -
AFOREST+cloneable domain controllers regular 20522 -
AFOREST+protected users regular 20525 -
AFOREST+ras and ias servers regular 20553 -
AFOREST+allowed rodc password replication group regular 20571 -
AFOREST+denied rodc password replication group regular 20572 -
AFOREST+winrmremotewmiusers__ regular 21000 -
AFOREST+dnsadmins regular 21102 -
AFOREST+dnsupdateproxy regular 21103 -
...
$> SYSTEMD_LOG_LEVEL=7 getent -sgroup:systemd group
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetGroupRecord","parameters":{"service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":21000,"groupName":"AFOREST+winrmremotewmiusers__","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+winrmremotewmiusers__","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+winrmremotewmiusers__:x:21000:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20515,"groupName":"AFOREST+domain computers","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+domain computers","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain computers:x:20515:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20516,"groupName":"AFOREST+domain controllers","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+domain controllers","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain controllers:x:20516:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20518,"groupName":"AFOREST+schema admins","members":["AFOREST+administrator"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+schema admins","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+schema admins:x:20518:AFOREST+administrator
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20519,"groupName":"AFOREST+enterprise admins","members":["AFOREST+administrator"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+enterprise admins","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+enterprise admins:x:20519:AFOREST+administrator
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20517,"groupName":"AFOREST+cert publishers","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+cert publishers","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+cert publishers:x:20517:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20512,"groupName":"AFOREST+domain admins","members":["AFOREST+administrator"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+domain admins","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain admins:x:20512:AFOREST+administrator
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20513,"groupName":"AFOREST+domain users","members":["AFOREST+user1","AFOREST+administrator","AFOREST+krbtgt"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+domain users","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain users:x:20513:AFOREST+user1,AFOREST+administrator,AFOREST+krbtgt
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20514,"groupName":"AFOREST+domain guests","members":["AFOREST+guest"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+domain guests","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+domain guests:x:20514:AFOREST+guest
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20520,"groupName":"AFOREST+group policy creator owners","members":["AFOREST+administrator"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+group policy creator owners","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+group policy creator owners:x:20520:AFOREST+administrator
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20553,"groupName":"AFOREST+ras and ias servers","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+ras and ias servers","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+ras and ias servers:x:20553:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20571,"groupName":"AFOREST+allowed rodc password replication group","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+allowed rodc password replication group","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+allowed rodc password replication group:x:20571:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20572,"groupName":"AFOREST+denied rodc password replication group","members":["AFOREST+krbtgt"],"service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+denied rodc password replication group","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+denied rodc password replication group:x:20572:AFOREST+krbtgt
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20521,"groupName":"AFOREST+read-only domain controllers","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+read-only domain controllers","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+read-only domain controllers:x:20521:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20498,"groupName":"AFOREST+enterprise read-only domain controllers","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+enterprise read-only domain controllers","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+enterprise read-only domain controllers:x:20498:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20522,"groupName":"AFOREST+cloneable domain controllers","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+cloneable domain controllers","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+cloneable domain controllers:x:20522:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20525,"groupName":"AFOREST+protected users","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+protected users","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+protected users:x:20525:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":21102,"groupName":"AFOREST+dnsadmins","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+dnsadmins","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+dnsadmins:x:21102:
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":21103,"groupName":"AFOREST+dnsupdateproxy","service":"org.samba.winbind"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"groupName":"AFOREST+dnsupdateproxy","service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+dnsupdateproxy:x:21103:
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"error":"io.systemd.UserDatabase.NoRecordFound"}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
Got lookup error: io.systemd.UserDatabase.NoRecordFound
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:24:15 +0000 (18:24 +0100)]
winbind:varlink: Implement get user record by name and uid
$> varlink call unix:/run/systemd/userdb/org.samba.winbind/io.systemd.UserDatabase.GetUserRecord "{\"service\":\"org.samba.winbind\",\"userName\":\"AFOREST+user1\",\"uid\":21105}"
{
"incomplete": false,
"record": {
"gid": 20513,
"homeDirectory": "/home/AFOREST/user1",
"service": "org.samba.winbind",
"shell": "/bin/bash",
"uid": 21105,
"userName": "AFOREST+user1"
}
}
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:22:30 +0000 (18:22 +0100)]
winbind:varlink: Implement get user record by name
$> userdbctl -s org.samba.winbind user AFOREST+user1
Enabled services: org.samba.winbind
User name: AFOREST+user1
Disposition: regular
Login OK: yes
Password OK: no (none set)
UID: 21105
GID: 20513 (unresolvable: No such process)
Directory: /home/AFOREST/user1
Storage: classic
Shell: /bin/bash
Passwords: none
Service: org.samba.winbind
$> SYSTEMD_LOG_LEVEL=7 getent -spasswd:systemd passwd AFOREST+user1
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetUserRecord","parameters":{"userName":"AFOREST+user1","service":"org.samba.winbind"}}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":20513,"homeDirectory":"/home/AFOREST/user1","service":"org.samba.winbind","shell":"/bin/bash","uid":21105,"userName":"AFOREST+user1"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+user1:x:21105:20513:AFOREST+user1:/home/AFOREST/user1:/bin/bash
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:20:32 +0000 (18:20 +0100)]
winbind:varlink: Implement get user record by uid
$> userdbctl -s org.samba.winbind user 21105
Enabled services: org.samba.winbind
User name: AFOREST+user1
Disposition: regular
Login OK: yes
Password OK: no (none set)
UID: 21105
GID: 20513 (unresolvable: No such process)
Directory: /home/AFOREST/user1
Storage: classic
Shell: /bin/bash
Passwords: none
Service: org.samba.winbind
$> SYSTEMD_LOG_LEVEL=7 getent -spasswd:systemd passwd 21105
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetUserRecord","parameters":{"uid":21105,"service":"org.samba.winbind"}}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":20513,"homeDirectory":"/home/AFOREST/user1","service":"org.samba.winbind","shell":"/bin/bash","uid":21105,"userName":"AFOREST+user1"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+user1:x:21105:20513:AFOREST+user1:/home/AFOREST/user1:/bin/bash
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:17:52 +0000 (18:17 +0100)]
winbind:varlink: Implement user record enumeration
$> userdbctl -s org.samba.winbind
Enabled services: org.samba.winbind
NAME DISPOSITION UID GID REALNAME HOME SHELL
...
AFOREST+administrator regular 20500 20513 - /home/AFOREST/administrator /bin/bash
AFOREST+guest regular 20501 20513 - /home/AFOREST/guest /bin/bash
AFOREST+krbtgt regular 20502 20513 - /home/AFOREST/krbtgt /bin/bash
AFOREST+user1 regular 21105 20513 - /home/AFOREST/user1 /bin/bash
...
$> SYSTEMD_LOG_LEVEL=7 getent -spasswd:systemd passwd
varlink: Setting state idle-client
/run/systemd/userdb/org.samba.winbind: Sending message: {"method":"io.systemd.UserDatabase.GetUserRecord","parameters":{"service":"org.samba.winbind"},"more":true}
/run/systemd/userdb/org.samba.winbind: Changing state idle-client → awaiting-reply-more
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20513,"homeDirectory":"/home/AFOREST/administrator","service":"org.samba.winbind","shell":"/bin/bash","uid":20500,"userName":"AFOREST+administrator"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
AFOREST+administrator:x:20500:20513:AFOREST+administrator:/home/AFOREST/administrator:/bin/bash
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20513,"homeDirectory":"/home/AFOREST/guest","service":"org.samba.winbind","shell":"/bin/bash","uid":20501,"userName":"AFOREST+guest"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
AFOREST+guest:x:20501:20513:AFOREST+guest:/home/AFOREST/guest:/bin/bash
/run/systemd/userdb/org.samba.winbind: New incoming message: {"continues":true,"parameters":{"incomplete":false,"record":{"gid":20513,"homeDirectory":"/home/AFOREST/krbtgt","service":"org.samba.winbind","shell":"/bin/bash","uid":20502,"userName":"AFOREST+krbtgt"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → awaiting-reply-more
AFOREST+krbtgt:x:20502:20513:AFOREST+krbtgt:/home/AFOREST/krbtgt:/bin/bash
/run/systemd/userdb/org.samba.winbind: New incoming message: {"parameters":{"incomplete":false,"record":{"gid":20513,"homeDirectory":"/home/AFOREST/user1","service":"org.samba.winbind","shell":"/bin/bash","uid":21105,"userName":"AFOREST+user1"}}}
/run/systemd/userdb/org.samba.winbind: Changing state awaiting-reply-more → processing-reply
/run/systemd/userdb/org.samba.winbind: Changing state processing-reply → idle-client
AFOREST+user1:x:21105:20513:AFOREST+user1:/home/AFOREST/user1:/bin/bash
$> ./bin/varlink-tool call unix:/run/systemd/userdb/org.samba.winbind/io.systemd.UserDatabase.GetUserRecord "{\"service\":\"org.samba.winbind\"}" -m
...
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Mon, 6 Feb 2023 17:11:33 +0000 (18:11 +0100)]
winbind:varlink: Add a function to craft a winbindd_cli_state structure
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Wed, 1 Feb 2023 16:02:38 +0000 (17:02 +0100)]
winbind:varlink: Add io.systemd.UserDatabase interface
$> varlink info unix:/run/systemd/userdb/org.samba.winbind
Vendor: Samba
Product: Winbind
Version: 1
URL: https://samba.org
Interfaces:
io.systemd.UserDatabase
org.varlink.service
TODO libvarlink bug handling camel case interface names:
https://github.com/varlink/libvarlink/pull/58
$> varlink help unix:/run/systemd/userdb/org.samba.winbind/io.systemd.UserDatabase
interface io.systemd.UserDatabase
method GetUserRecord(
uid: ?int,
userName: ?string,
service: string
) -> (record: object, incomplete: bool)
method GetGroupRecord(
gid: ?int,
groupName: ?string,
service: string
) -> (record: object, incomplete: bool)
method GetMemberships(
userName: ?string,
groupName: ?string,
service: string
) -> (userName: string, groupName: string)
error NoRecordFound ()
error BadService ()
error ServiceNotAvailable ()
error ConflictingRecordFound ()
error EnumerationNotSupported ()
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Thu, 2 Feb 2023 08:56:05 +0000 (09:56 +0100)]
winbind:varlink: Create varlink socket directory
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Wed, 1 Feb 2023 16:01:21 +0000 (17:01 +0100)]
winbind:varlink: Add varlink service
$> userdbctl services
SERVICE LISTENING
org.samba.winbind yes
1 services listed.
$> varlink info unix:/run/systemd/userdb/org.samba.winbind
Vendor: Samba
Product: Winbind
Version: 1
URL: https://samba.org
Interfaces:
org.varlink.service
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Wed, 8 Feb 2023 09:29:48 +0000 (10:29 +0100)]
winbind: Add "winbind varlink service" smb.conf option
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Tue, 21 Jan 2025 11:12:55 +0000 (12:12 +0100)]
wscript: Add --with-systemd-userdb option
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Samuel Cabrero [Fri, 26 Jan 2024 11:21:59 +0000 (12:21 +0100)]
winbind: Fix running in interactive mode
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
yogita72 [Tue, 4 Feb 2025 02:05:11 +0000 (02:05 +0000)]
ctdb-scripts: Fix CTDB_BASE to allow event scripts to run standalone
commit
12fd8d7a5c5d14d403aac6cd9e318afcd0a8e159 broke this when it moved the eventscripts
down a subdirectory without changing this boilerplate.
Signed-off-by: yogita72 <yogita.bijani@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Feb 19 02:43:44 UTC 2025 on atb-devel-224
Stefan Metzmacher [Wed, 17 Jul 2024 16:12:31 +0000 (18:12 +0200)]
python:lsa_utils: Fix fallback to OpenPolicy2
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Feb 17 18:33:15 UTC 2025 on atb-devel-224
Andreas Schneider [Thu, 13 Feb 2025 09:31:49 +0000 (10:31 +0100)]
python:lsa_utils: Don't use optional arguments for OpenPolicyFallback()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andreas Schneider [Mon, 17 Feb 2025 14:41:06 +0000 (15:41 +0100)]
pidl: Update documentation for DCERPC interface connections
https://realpython.com/documenting-python-code/
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 17 Jul 2024 16:11:49 +0000 (18:11 +0200)]
librpc:pyrpc: Allow new authenticated rpc connection on the same transport as the basis_connection
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 17 Jul 2024 15:39:24 +0000 (17:39 +0200)]
dcesrv_core: Make dcesrv_call_disconnect_after() public
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 12 Feb 2025 11:45:19 +0000 (12:45 +0100)]
s3:rpc_client: Use cli_rpc_pipe_reopen_np_noauth() for OpenPolicy fallback
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 12 Feb 2025 13:17:30 +0000 (14:17 +0100)]
s3:rpc_cerver: Use dcerpc_lsa_open_policy3() for internal RPC
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Stefan Metzmacher [Wed, 12 Feb 2025 11:35:20 +0000 (12:35 +0100)]
s3:rpc_client: Add cli_rpc_pipe_reopen_np_noauth()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15680
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Pavel Filipenský [Fri, 14 Feb 2025 16:27:26 +0000 (17:27 +0100)]
docs: Update documentation for 'sync machine password to keytab'
Use specifier 'spn_prefixes=host' instead of 'host'
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15759
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Sat Feb 15 19:21:56 UTC 2025 on atb-devel-224
Pavel Filipenský [Fri, 14 Feb 2025 16:28:54 +0000 (17:28 +0100)]
s3:libads: Remove specifier for 'host' principal from 'sync machine password to keytab'
Use specifier 'spn_prefixes=host' instead of 'host'
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15759
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Björn Baumbach [Thu, 13 Feb 2025 17:05:44 +0000 (18:05 +0100)]
pytests: test pysmbd with relative path names via samba-tool ntacl
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15806
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Fri Feb 14 16:18:19 UTC 2025 on atb-devel-224
Volker Lendecke [Wed, 12 Feb 2025 12:45:42 +0000 (13:45 +0100)]
pysmbd: Fix interactive samba-tool use after
0bb35e246141
samba-tool ntacl also calls into pysmbd, and
0bb35e246141 broke
relative path names. Thanks to Björn Baumbach <bb@sernet.de> for
testing interactively!!
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15806
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Björn Baumbach [Wed, 12 Feb 2025 16:15:37 +0000 (17:15 +0100)]
pytests: test pysmbd with non-existent file
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15807
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Volker Lendecke [Mon, 13 Jan 2025 10:45:06 +0000 (11:45 +0100)]
pysmbd: Init mangle_fns
openat_pathref_fsp() eventually calls mangling functions, so we have
to initialize them.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15807
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Stefan Metzmacher [Mon, 2 Dec 2024 13:45:18 +0000 (14:45 +0100)]
s4:kdc: pass the full samba_kdc_db_context to most helper functions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 14 15:19:24 UTC 2025 on atb-devel-224
Stefan Metzmacher [Fri, 29 Nov 2024 11:08:00 +0000 (12:08 +0100)]
s4:kdc: let struct samba_kdc_entry_pac remember the krbtgt samba_kdc_entry
This will allow us later to find the information needed to do
sid filtering of the pac.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 15:26:39 +0000 (16:26 +0100)]
s4:kdc: always go through samba_kdc_get_device_info_blob()
This means we always go through samba_kdc_get_user_info_dc()
both for client and also device pac.
It means we use the same logic regarding samba_krb5_pac_is_trusted()
and calling authsam_update_user_info_dc().
It means we do all logic on struct auth_user_info_dc
and only convert to PAC_DEVICE_INFO at the end.
Before we tried a mix of calling authsam_update_user_info_dc()
on a half constructed auth_user_info_dc,
while trying to apply the diff on auth_user_info_dc
to the also half constructed PAC_DEVICE_INFO.
Which can't work once auth_user_info_dc() will
apply sid filtering and the number of sids
may shrink.
Now we use authsam_update_user_info_dc()
followed by auth_convert_user_info_dc_saminfo3()
and samba_kdc_make_device_info().
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Thu, 19 Dec 2024 17:30:49 +0000 (18:30 +0100)]
auth: remember the origin of sids from the PAC
So far the conversion from TGT PAC to
struct auth_user_info_dc back to TGS PAC
looses the information in what part of
the PAC_LOGON_INFO a sid was stored.
With this change we let
make_user_info_dc_{netlogon_validation,pac}()
remember this, so that
auth_convert_user_info_dc_sam{baseinfo,info6}()
can rebuild the information into the desired
parts of the PAC_LOGON_INFO.
This was found and fixed for sid filter related
tests, but it turns out that it already
fixes a few tests from samba.tests.krb5.device_tests.
All other places get an implicit AUTH_SID_ORIGIN_UNKNOWN (=0),
which means we use the same logic as before.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 10:34:42 +0000 (11:34 +0100)]
s4:auth: simplify authsam_make_user_info_dc()
By using (struct auth_SidAttr) {} we don't leave
uninitialized memory if struct auth_SidAttr changes.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 11 Feb 2025 20:16:02 +0000 (21:16 +0100)]
s4:auth: let authsam_make_user_info_dc() use helper variables for the rodcsid
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 11 Feb 2025 20:16:02 +0000 (21:16 +0100)]
s4:auth: let authsam_make_user_info_dc() use helper variables for the groupsid
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 10:36:52 +0000 (11:36 +0100)]
s4:auth: let auth_domain_admin_user_info_dc() use talloc_zero_array(struct auth_SidAttr)
This means we won't leave uninitialized memory if
struct auth_SidAttr changes.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 10:34:42 +0000 (11:34 +0100)]
s4:auth: simplify auth_anonymous_user_info_dc()
By using (struct auth_SidAttr) {} we don't leave
uninitialized memory if struct auth_SidAttr changes.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 10:34:42 +0000 (11:34 +0100)]
s4:auth: simplify auth_system_user_info_dc()
By using (struct auth_SidAttr) {} we don't leave
uninitialized memory if struct auth_SidAttr changes.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 10:26:32 +0000 (11:26 +0100)]
s4:auth: let auth_generate_security_token() use auth_user_info_dc_expand_sids() for device_info
This means we'll also expand local groups for the device,
which was missing before.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 10:17:42 +0000 (11:17 +0100)]
s4:auth: split auth_user_info_dc_expand_sids() out of auth_generate_security_token()
This way we'll be able to reuse it for the device sids in the
next commit.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 09:02:45 +0000 (10:02 +0100)]
s4:dsdb/common: simplify the logic in dsdb_expand_nested_groups()
By using (struct auth_SidAttr) {} we make sure struct auth_SidAttr
can change without leaving uninitialized memory.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 08:55:20 +0000 (09:55 +0100)]
s4:dsdb/common: use talloc_zero() in samdb_result_dom_sid_attrs()
This means struct auth_SidAttr can change without leaving
uninitialized memory.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 08:52:37 +0000 (09:52 +0100)]
s4:auth/ntlm: simplifiy logic in name_to_ntstatus_check_password()
Using (struct auth_SidAttr) {} means we won't leave
uninitialized memory arround if struct auth_SidAttr will
change in the following commits.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 08:43:44 +0000 (09:43 +0100)]
libcli/security: simplify logic in add_sid_to_array_attrs()
(struct auth_SidAttr) {} makes sure we don't leave uninitialized
memory in case struct auth_SidAttr will change (which will happen in
the next commits).
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 08:36:32 +0000 (09:36 +0100)]
auth: simplify logic in make_user_info_dc_{netlogon_validation,pac}()
It's better to use (struct auth_SidAttr) {} in order to
intialize all members.
struct auth_SidAttr will change in the next commits
and this makes it easier to review that we don't
leave some parts uninitialized.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 08:36:32 +0000 (09:36 +0100)]
auth: let make_user_info_dc_netlogon_validation allocate the sid array in one go
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 08:36:32 +0000 (09:36 +0100)]
auth: let make_user_info_dc_netlogon_validation validate all parameters first
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 29 Jan 2025 08:36:32 +0000 (09:36 +0100)]
auth: remove sid-filtering comment in make_user_info_dc_netlogon_validation
sid filtering will be done at a different level...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 28 Jan 2025 18:49:23 +0000 (19:49 +0100)]
auth.idl: make sure ndr_{push,pull}_auth_SidAttr() is never used
auth_SidAttr is currently not used for any IPC traffic,
with this change demonstrates that and makes sure it
stays that way.
It means we are free to change auth_SidAttr without the
need to change any ipc protocol version.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Thu, 1 Feb 2018 15:23:02 +0000 (16:23 +0100)]
libcli/security: add some more global_sid_ values required for SID filtering
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 15 Jan 2025 09:30:53 +0000 (10:30 +0100)]
ndr_claims: only use compression if it actually reduces the size
I have captures showing that claims compression depends on the payload
itself and how well it compresses, instead of the pure length of the
payload.
E.g. a single string claim with a value of 68 'a'
characters has an unpressed size of 336
and compressed size is 335.
While a single string with random string s1
has an unpressed size of 504 and it's still
uncompressed on the wire.
A different random string s2 also has an unpressed
size of 504, but it is compressed into a size of 502.
So it really depends if the compression makes it actually
smaller than the uncompressed version.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Feb 14 11:56:49 UTC 2025 on atb-devel-224
Stefan Metzmacher [Wed, 15 Jan 2025 11:24:04 +0000 (12:24 +0100)]
python:tests/krb5: only expect compressed claims if the compression reduces the size
I have captures showing that claims compression depends on the payload
itself and how well it compresses, instead of the pure length of the
payload.
E.g. a single string claim with a value of 68 'a'
characters has an unpressed size of 336
and compressed size is 335.
While a single string with random string s1
has an unpressed size of 504 and it's still
uncompressed on the wire.
A different random string s2 also has an unpressed
size of 504, but it is compressed into a size of 502.
So it really depends if the compression makes it actually
smaller than the uncompressed version.
This makes the tests more reliable against Windows DCs
with existing claims defined.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Mon, 3 Feb 2025 16:15:28 +0000 (17:15 +0100)]
python:tests: add ClaimsTransformationTests to security.py
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Fri, 17 Jan 2025 12:24:28 +0000 (13:24 +0100)]
libcli/security: add py_claims_tf_policy_{parse_rules,wrap_xml}()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Mon, 3 Feb 2025 13:31:23 +0000 (14:31 +0100)]
libcli/security: add claims_tf_policy_[un]wrap_xml() for msDS-TransformationRules
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Mon, 13 Jan 2025 23:35:24 +0000 (00:35 +0100)]
libcli/security: add claims_tf_rule_set_parse_blob() for MS-CTA rules
It parses [MS-CTA] rules into structures.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Mon, 3 Feb 2025 12:56:54 +0000 (13:56 +0100)]
claims.idl: add some helper structs for claims transformation [MS-CTA]
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Ralph Boehme [Wed, 29 Jan 2025 14:11:16 +0000 (15:11 +0100)]
mdssvc: support a few more attributes
This adds support for the following Spotlight Metadata Attributes:
_kMDItemFileName (another alias for kMDItemFSName and kMDItemDisplayName)
kMDItemLastUsedDate
kMDItemContentCreationDate
kMDItemLogicalSize (another alias for kMDItemFSSize)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15796
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Shweta Sodani [Wed, 5 Feb 2025 05:51:37 +0000 (11:21 +0530)]
vfs_ceph_new:minor logging improvement
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15703
Signed-off-by: Shweta Sodani <ssodani@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Feb 14 10:57:50 UTC 2025 on atb-devel-224
Pavel Filipenský [Tue, 14 Jan 2025 10:29:54 +0000 (11:29 +0100)]
docs-xml:smbdotconf: Document new options for 'sync machinepassword to keytab'
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15759
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Thu Feb 13 18:45:21 UTC 2025 on atb-devel-224
Pavel Filipenský [Mon, 20 Jan 2025 15:00:51 +0000 (16:00 +0100)]
s3: Add new keytab specifiers
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15759
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Douglas Bagnall [Thu, 9 Jan 2025 03:14:05 +0000 (16:14 +1300)]
ndr: fix coda logic around in ndr_pull_security_ace()
Sometimes an access allowed object ACE has unneeded trailing bytes,
like this:
aces: struct security_ace
type : SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT (5)
flags : 0x00 (0)
0: SEC_ACE_FLAG_OBJECT_INHERIT
0: SEC_ACE_FLAG_CONTAINER_INHERIT
0: SEC_ACE_FLAG_NO_PROPAGATE_INHERIT
0: SEC_ACE_FLAG_INHERIT_ONLY
0: SEC_ACE_FLAG_INHERITED_ACE
0x00: SEC_ACE_FLAG_VALID_INHERIT (0)
0: SEC_ACE_FLAG_SUCCESSFUL_ACCESS
0: SEC_ACE_FLAG_FAILED_ACCESS
size : 0x0048 (72)
access_mask : 0x00000100 (256)
object : union security_ace_object_ctr(case 1)
object: struct security_ace_object
flags : 0x00000001 (1)
1: SEC_ACE_OBJECT_TYPE_PRESENT
0: SEC_ACE_INHERITED_OBJECT_TYPE_PRESENT
type : union security_ace_object_type(case 1)
type :
edacfd8f -ffb3-11d1-b41d-
00a0c968f939
inherited_type : union security_ace_object_inherited_type(case 0)
trustee : S-1-3-0
coda : union security_ace_coda(case 5)
ignored : DATA_BLOB length=32
[0000] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
[0010] 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
which we need to pull in order to ignore.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb 13 15:15:40 UTC 2025 on atb-devel-224
Douglas Bagnall [Wed, 12 Feb 2025 02:29:28 +0000 (15:29 +1300)]
pytest: add ndr packing tests for security descriptors
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Stefan Metzmacher [Tue, 11 Feb 2025 15:42:22 +0000 (16:42 +0100)]
s3:tldap: add some const to 'const char * const *attrs'
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb 13 13:14:02 UTC 2025 on atb-devel-224
Stefan Metzmacher [Tue, 11 Feb 2025 14:33:35 +0000 (15:33 +0100)]
s3:tldap: avoid using talloc_tos()
Async code should never use it without
creating its own stackframe!
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Volker Lendecke [Wed, 30 Sep 2020 12:36:40 +0000 (14:36 +0200)]
vfs_streams_depot: Introduce streams_depot_config_data
Read the vfs parameters just once: lp_parm_* are not free with their
string comparisons, calling them over and over again is unnecessary
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb 13 09:40:22 UTC 2025 on atb-devel-224
Volker Lendecke [Thu, 23 Jan 2025 12:42:48 +0000 (13:42 +0100)]
vfs: Allow WITH_BACKUP_INTENT in vfs openat functions
BACKUP_INTENT has no real meaning so far throughout our code, so we
should ignore and thus allow it in our openat-intercepting functions.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 11 Feb 2025 16:09:17 +0000 (17:09 +0100)]
winbindd: move dead code into a comment
We need to re-activate this once we support multitple domains
in out own forest.
Fixes CID
1642726 : Control flow issues (UNREACHABLE)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Feb 11 23:18:02 UTC 2025 on atb-devel-224
Björn Baumbach [Mon, 10 Feb 2025 16:42:12 +0000 (17:42 +0100)]
libnet4: free tevent request even on error
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15798
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Björn Baumbach <bb@sernet.de>
Autobuild-Date(master): Tue Feb 11 11:05:37 UTC 2025 on atb-devel-224
Stefan Metzmacher [Fri, 10 Jan 2025 12:12:55 +0000 (13:12 +0100)]
drsuapi.idl: fix source_dsa spelling
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Feb 8 19:49:33 UTC 2025 on atb-devel-224
Stefan Metzmacher [Mon, 13 Jan 2025 22:25:35 +0000 (23:25 +0100)]
security.idl: DOMAIN_RID_{FOREST,EXTERNAL}_TRUST_ACCOUNTS
These seem to be new in Windows 2025.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 28 Jan 2025 13:29:58 +0000 (14:29 +0100)]
security.idl: add SID_NT_THIS_ORGANIZATION_CERTIFICATE
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 4 Dec 2024 17:24:04 +0000 (18:24 +0100)]
security.idl: change ORGANISATION into ORGANIZATION
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Wed, 5 Feb 2025 12:16:03 +0000 (13:16 +0100)]
drsblobs.idl: make some scannerInfo related stuff public
This is needed in order to use ndr_pack() on them
in python code.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 17 Dec 2024 16:49:52 +0000 (17:49 +0100)]
drsblobs.idl: use dom_sid0 in ForestTrustDataDomainInfo
We already use ndr_size_dom_sid0() and when ForestTrustDataDomainInfo
is used as part of ForestTrustDataScannerInfo, sid_size is 0
and the subcontext for the sid is skipped.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 17 Dec 2024 16:44:44 +0000 (17:44 +0100)]
drsblobs.idl: introduce ForestTrustDataScannerInfo
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 17 Dec 2024 14:40:49 +0000 (15:40 +0100)]
drsblobs.idl: split explicit binary data and unknown data for ForestTrustData
For know FOREST_TRUST_SCANNER_INFO unknown.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 17 Dec 2024 13:53:00 +0000 (14:53 +0100)]
drsblobs.idl: set NDR_PAHEX for ForestTrustDataBinaryData
The dump_data hexdump is much easier to read...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 17 Dec 2024 13:40:32 +0000 (14:40 +0100)]
s4:torture/ndr: add a ForestTrustInfo ndr test with FOREST_TRUST_SCANNER_INFO
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Tue, 17 Dec 2024 11:30:56 +0000 (12:30 +0100)]
drsblobs.idl: add support for ForestTrustInfo with FOREST_TRUST_SCANNER_INFO
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
Stefan Metzmacher [Fri, 20 Dec 2024 18:50:53 +0000 (19:50 +0100)]
s4:kdc: let samba_kdc_trust_message2entry don't support WITHIN_FOREST and PIM_TRUST
These are not supported yet.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Feb 8 16:23:30 UTC 2025 on atb-devel-224
Stefan Metzmacher [Mon, 23 Dec 2024 13:55:39 +0000 (14:55 +0100)]
winbindd: don't support PIM_TRUST and WITHIN_FOREST
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Dec 2024 19:43:43 +0000 (20:43 +0100)]
s4:rpc_server/lsa: PIM trusts are not supported yet
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Dec 2024 19:43:18 +0000 (20:43 +0100)]
s4:rpc_server/lsa: a PIM trust requires FOREST_TRANSITIVE
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Dec 2024 18:34:59 +0000 (19:34 +0100)]
s4:rpc_server/lsa: WITHIN_FOREST together with FOREST_TRANSITIVE is invalid
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Dec 2024 18:26:10 +0000 (19:26 +0100)]
s4:rpc_server/lsa: don't allow WITHIN_FOREST trusts
They are not supported yet.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 19 Dec 2024 18:22:47 +0000 (19:22 +0100)]
s4:rpc_server/lsa: don't allow WITHIN_FOREST together with CROSS_ORGANIZATION
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 30 Jan 2025 18:03:32 +0000 (19:03 +0100)]
s4:rpc_server: dcesrv_lsa_DeleteObject needs to close the handles
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 30 Jan 2025 18:07:08 +0000 (19:07 +0100)]
s4:rpc_server/lsa: let dcesrv_lsa_CreateTrustedDomain check for valid netbios name length
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 30 Jan 2025 18:10:03 +0000 (19:10 +0100)]
s4:dsdb/common: check for valid netbios name length for trusts
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Wed, 5 Feb 2025 12:12:48 +0000 (13:12 +0100)]
python:tests: let lsa_utils.py use valid netbios names
createtrustrelax has 16 characters, but only 15 are allowed
and they are typically uppercase.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 30 Jan 2025 18:04:28 +0000 (19:04 +0100)]
s4:rpc_server/lsa: no longer send MSG_WINBIND_RELOAD_TRUSTED_DOMAINS
This is done by the "trust_notify" ldb module now.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Thu, 6 Feb 2025 19:11:20 +0000 (20:11 +0100)]
s4:dsdb/ldb_modules: add trust_notify module
This will notify winbindd if critical aspects
of the trusted domain topology are changed.
It means it will also happen when the changes are
replicated from other DCs.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Stefan Metzmacher [Tue, 4 Feb 2025 17:32:59 +0000 (18:32 +0100)]
winbindd: introduce update_trusted_domains_dc()
Reloading trusts should reload every aspect of
the trust and also remove deleted trusts from
the winbindd _domain_list.
But pending requests still continue.
With this commit it is required that
async state structures use struct winbindd_domain_ref
instead of raw struct winbindd_domain pointers,
in order to usage of stale pointers.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>