The Samba-Bugzilla – Attachment 1381 Details for
Bug 2944
utils/net_idmap.c: "int *'s" incompatible with "uid_t *" and "gid_t *"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Change uid_t and gid_t
idmap.patch (text/plain), 1.10 KB, created by
Jason Mader (mail bounces back)
on 2005-08-15 14:49:02 UTC
(
hide
)
Description:
Change uid_t and gid_t
Filename:
MIME Type:
Creator:
Jason Mader (mail bounces back)
Created:
2005-08-15 14:49:02 UTC
Size:
1.10 KB
patch
obsolete
>Index: utils/net_idmap.c >=================================================================== >--- utils/net_idmap.c (revision 9303) >+++ utils/net_idmap.c (working copy) >@@ -76,37 +76,40 @@ > > struct hwms { > BOOL ok; >- int user_hwm; >- int group_hwm; >+ uid_t user_hwm; >+ gid_t group_hwm; > }; > > static int net_idmap_find_max_id(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA data, > void *handle) > { > struct hwms *hwms = (struct hwms *)handle; >- int *idptr = NULL; >+ uid_t *uidptr = NULL; >+ gid_t *gidptr = NULL; > int id; > > if (strncmp(key.dptr, "S-", 2) != 0) > return 0; > > if (sscanf(data.dptr, "GID %d", &id) == 1) { >- idptr = &hwms->group_hwm; >+ gidptr = &hwms->group_hwm; > } > > if (sscanf(data.dptr, "UID %d", &id) == 1) { >- idptr = &hwms->user_hwm; >+ uidptr = &hwms->user_hwm; > } > >- if (idptr == NULL) { >+ if (uidptr == NULL && gidptr == NULL) { > d_printf("Illegal idmap entry: [%s]->[%s]\n", > key.dptr, data.dptr); > hwms->ok = False; > return -1; > } > >- if (*idptr <= id) >- *idptr = id+1; >+ if (*uidptr <= id) >+ *uidptr = id+1; >+ else if (*gidptr <= id) >+ *gidptr = id+1; > > return 0; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 2944
: 1381