diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-12-16 19:51:35 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-12-16 19:51:35 +0100 |
commit | 54dc421f5820099531a77879f52a904c2fefcf49 (patch) | |
tree | daf0685fb9cb93e41332592f2be087686afb7ccc | |
parent | d59a79e5bb425d260af3261e88422eeaf1f1359c (diff) | |
parent | 4c3aea3f62a76fa62ead66d64941156375fc4501 (diff) | |
download | samba-54dc421f5820099531a77879f52a904c2fefcf49.tar.gz samba-54dc421f5820099531a77879f52a904c2fefcf49.tar.bz2 samba-54dc421f5820099531a77879f52a904c2fefcf49.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
-rw-r--r-- | lib/tdb/tools/tdbtool.c | 2 | ||||
-rw-r--r-- | nsswitch/winbind_nss_solaris.c | 9 | ||||
-rw-r--r-- | nsswitch/winbind_nss_solaris.h | 3 | ||||
-rw-r--r-- | source3/include/libsmb_internal.h | 13 | ||||
-rw-r--r-- | source3/libsmb/libsmb_dir.c | 10 |
5 files changed, 22 insertions, 15 deletions
diff --git a/lib/tdb/tools/tdbtool.c b/lib/tdb/tools/tdbtool.c index 1ecad62a3d..2a11cdaef3 100644 --- a/lib/tdb/tools/tdbtool.c +++ b/lib/tdb/tools/tdbtool.c @@ -455,7 +455,7 @@ static void next_record(TDB_CONTEXT *the_tdb, TDB_DATA *pkey) print_rec(the_tdb, *pkey, dbuf, NULL); } -static int test_fn(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state) +static int test_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state) { return 0; } diff --git a/nsswitch/winbind_nss_solaris.c b/nsswitch/winbind_nss_solaris.c index 4c85bd3621..5fb37643ce 100644 --- a/nsswitch/winbind_nss_solaris.c +++ b/nsswitch/winbind_nss_solaris.c @@ -281,17 +281,22 @@ _nss_winbind_getgroupsbymember_solwrap(nss_backend_t* be, void* args) { int errnop; struct nss_groupsbymem *gmem = (struct nss_groupsbymem *)args; + long int numgids = gmem->numgids; + long int maxgids = gmem->maxgids; NSS_DEBUG("_nss_winbind_getgroupsbymember"); _nss_winbind_initgroups_dyn(gmem->username, gmem->gid_array[0], /* Primary Group */ - &gmem->numgids, - &gmem->maxgids, + &numgids, + &maxgids, &gmem->gid_array, gmem->maxgids, &errnop); + gmem->numgids = numgids; + gmem->maxgids = maxgids; + /* * If the maximum number of gids have been found, return * SUCCESS so the switch engine will stop searching. Otherwise diff --git a/nsswitch/winbind_nss_solaris.h b/nsswitch/winbind_nss_solaris.h index c6cadefc38..f805542f75 100644 --- a/nsswitch/winbind_nss_solaris.h +++ b/nsswitch/winbind_nss_solaris.h @@ -81,5 +81,8 @@ NSS_STATUS _nss_winbind_getgrnam_r(const char *name, NSS_STATUS _nss_winbind_getgrgid_r(gid_t gid, struct group *result, char *buffer, size_t buflen, int *errnop); +NSS_STATUS _nss_winbind_initgroups_dyn(char *user, gid_t group, long int *start, + long int *size, gid_t **groups, + long int limit, int *errnop); #endif /* _WINBIND_NSS_SOLARIS_H */ diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h index 3b909d13b9..b488116939 100644 --- a/source3/include/libsmb_internal.h +++ b/source3/include/libsmb_internal.h @@ -113,18 +113,19 @@ struct SMBC_internal_data { /* True when this handle is initialized */ bool initialized; - /* dirent pointer location - * + /* dirent pointer location */ + struct smbc_dirent dirent; + /* * Leave room for any urlencoded filename and the comment field. * - * We really should use sizeof(struct smbc_dirent) plus (NAME_MAX * 3) - * plus whatever the max length of a comment is, plus a couple of null - * terminators (one after the filename, one after the comment). + * We use (NAME_MAX * 3) plus whatever the max length of a comment is, + * plus a couple of null terminators (one after the filename, + * one after the comment). * * According to <linux/limits.h>, NAME_MAX is 255. Is it longer * anyplace else? */ - char dirent[1024]; + char _dirent_name[1024]; /* * server connection list diff --git a/source3/libsmb/libsmb_dir.c b/source3/libsmb/libsmb_dir.c index d12e7487f6..770014b6f6 100644 --- a/source3/libsmb/libsmb_dir.c +++ b/source3/libsmb/libsmb_dir.c @@ -976,9 +976,8 @@ SMBC_readdir_ctx(SMBCCTX *context, } - dirp = (struct smbc_dirent *)context->internal->dirent; - maxlen = (sizeof(context->internal->dirent) - - sizeof(struct smbc_dirent)); + dirp = &context->internal->dirent; + maxlen = sizeof(context->internal->_dirent_name); smbc_readdir_internal(context, dirp, dirent, maxlen); @@ -1049,9 +1048,8 @@ SMBC_getdents_ctx(SMBCCTX *context, } /* Do urlencoding of next entry, if so selected */ - dirent = (struct smbc_dirent *)context->internal->dirent; - maxlen = (sizeof(context->internal->dirent) - - sizeof(struct smbc_dirent)); + dirent = &context->internal->dirent; + maxlen = sizeof(context->internal->_dirent_name); smbc_readdir_internal(context, dirent, dirlist->dirent, maxlen); |