summaryrefslogtreecommitdiffstats
path: root/source3/nsswitch/libwbclient/wbc_pwd.c
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2008-01-30 12:00:15 +0300
committerAlexander Bokovoy <ab@samba.org>2008-01-30 12:00:15 +0300
commit2763b90d242119d25d9f5afa91a403e85425da06 (patch)
tree693290ff129af0f5dc0710a592e135ce1ae49932 /source3/nsswitch/libwbclient/wbc_pwd.c
parent77a3e46a4c5667e5a458e9931ed7129625a23d60 (diff)
parentaf92bf934ed7614ab0aa41015e296924823a0a5f (diff)
downloadsamba-2763b90d242119d25d9f5afa91a403e85425da06.tar.gz
samba-2763b90d242119d25d9f5afa91a403e85425da06.tar.xz
samba-2763b90d242119d25d9f5afa91a403e85425da06.zip
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into dmapi-integration
(This used to be commit d841a3fc999c5ebd9e9d54b2bd5099b1b50402b1)
Diffstat (limited to 'source3/nsswitch/libwbclient/wbc_pwd.c')
-rw-r--r--source3/nsswitch/libwbclient/wbc_pwd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/nsswitch/libwbclient/wbc_pwd.c b/source3/nsswitch/libwbclient/wbc_pwd.c
index b24e198bc5..b7febcce0c 100644
--- a/source3/nsswitch/libwbclient/wbc_pwd.c
+++ b/source3/nsswitch/libwbclient/wbc_pwd.c
@@ -209,16 +209,16 @@ wbcErr wbcGetgrnam(const char *name, struct group **grp)
struct winbindd_request request;
struct winbindd_response response;
- if (!name || !grp) {
- wbc_status = WBC_ERR_INVALID_PARAM;
- BAIL_ON_WBC_ERROR(wbc_status);
- }
-
/* Initialize request */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
+ if (!name || !grp) {
+ wbc_status = WBC_ERR_INVALID_PARAM;
+ BAIL_ON_WBC_ERROR(wbc_status);
+ }
+
/* dst is already null terminated from the memset above */
strncpy(request.data.groupname, name, sizeof(request.data.groupname)-1);
@@ -254,16 +254,16 @@ wbcErr wbcGetgrgid(gid_t gid, struct group **grp)
struct winbindd_request request;
struct winbindd_response response;
- if (!grp) {
- wbc_status = WBC_ERR_INVALID_PARAM;
- BAIL_ON_WBC_ERROR(wbc_status);
- }
-
/* Initialize request */
ZERO_STRUCT(request);
ZERO_STRUCT(response);
+ if (!grp) {
+ wbc_status = WBC_ERR_INVALID_PARAM;
+ BAIL_ON_WBC_ERROR(wbc_status);
+ }
+
request.data.gid = gid;
wbc_status = wbcRequestResponse(WINBINDD_GETGRGID,