diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-08-09 20:25:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:36 -0500 |
commit | 108009f2681726691da4dfbad1e1a628f6a53f44 (patch) | |
tree | 277c58b7fdd73c0aaf17e6c5d94878037836e85f /source3/torture | |
parent | 0511e8db1b5b3540b66de1655ea09a74d9c133a8 (diff) | |
download | samba-108009f2681726691da4dfbad1e1a628f6a53f44.tar.gz samba-108009f2681726691da4dfbad1e1a628f6a53f44.tar.bz2 samba-108009f2681726691da4dfbad1e1a628f6a53f44.zip |
r17470: This is the group mapping rewrite announced a few days ago. I'm afraid it's
more than 1000 lines of patch, but doing it in smaller pieces is hardly
possible.
Anybody interested please look over this. The patch is not really interesting,
just look at the new groupdb/mapping.c file.
Jerry, one entry for the 3.0.24 release notes: smbd will refuse to start if we
have overlapping mappings in group_mapping.tdb. With the old db a unix gid can
be mapped to two different SIDs. This will be refused with the new code.
Volker
(This used to be commit f0f0e893ca41d35b58b35929de78dcb911b3c7dc)
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/local-groupmap.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/source3/torture/local-groupmap.c b/source3/torture/local-groupmap.c index d223bd58b7..007d107e12 100644 --- a/source3/torture/local-groupmap.c +++ b/source3/torture/local-groupmap.c @@ -151,8 +151,6 @@ static BOOL groupmap_diff(const GROUP_MAP *m1, const GROUP_MAP *m2) (strcmp(m1->comment, m2->comment) != 0)); } -#undef GROUPDB_V3 - BOOL run_local_groupmap(int dummy) { TALLOC_CTX *mem_ctx; @@ -168,7 +166,6 @@ BOOL run_local_groupmap(int dummy) return False; } -#ifdef GROUPDB_V3 status = create_v2_db(True); if (!NT_STATUS_IS_OK(status)) { goto fail; @@ -176,13 +173,12 @@ BOOL run_local_groupmap(int dummy) { GROUP_MAP map; - if (pdb_getgrgid(&map, 10001)) { + if (NT_STATUS_IS_OK(pdb_getgrgid(&map, 10001))) { d_fprintf(stderr, "(%s) upgrading an invalid group db " "worked\n", __location__); goto fail; } } -#endif status = create_v2_db(False); if (!NT_STATUS_IS_OK(status)) { @@ -266,11 +262,7 @@ BOOL run_local_groupmap(int dummy) status = pdb_delete_group_mapping_entry(sid); CHECK_STATUS(status, NT_STATUS_OK); status = pdb_delete_group_mapping_entry(sid); -#ifdef GROUPDB_V3 CHECK_STATUS(status, NT_STATUS_NOT_FOUND); -#else - CHECK_STATUS(status, NT_STATUS_UNSUCCESSFUL); -#endif if (NT_STATUS_IS_OK(pdb_getgrsid(&map1, &sid))) { d_fprintf(stderr, "(%s) getgrsid found deleted " @@ -323,16 +315,12 @@ BOOL run_local_groupmap(int dummy) map.gid = 1000; status = pdb_update_group_mapping_entry(&map); -#ifdef GROUPDB_V3 CHECK_STATUS(status, NT_STATUS_OBJECTID_EXISTS); - if (!pdb_getgrgid(&map1, 4711)) { + if (!NT_STATUS_IS_OK(pdb_getgrgid(&map1, 4711))) { d_fprintf(stderr, "(%s) update_group changed entry " "upon failure\n", __location__); goto fail; } -#else - CHECK_STATUS(status, NT_STATUS_OK); -#endif } ret = True; |