]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nsswitch: Fix integer size types in winbind_write_sock()
authorAndreas Schneider <asn@samba.org>
Wed, 17 Jul 2024 08:50:30 +0000 (10:50 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 18 Jul 2024 12:47:30 +0000 (12:47 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
nsswitch/wb_common.c

index b7f84435a4ee8f57ded9bd3761e4e93b020e7ad3..9898b037c5560f2ba2dd5e0c5990473877bc97ef 100644 (file)
@@ -671,10 +671,14 @@ static int winbind_open_pipe_sock(struct winbindd_context *ctx,
 
 /* Write data to winbindd socket */
 
-static int winbind_write_sock(struct winbindd_context *ctx, void *buffer,
-                             int count, int recursing, int need_priv)
+static ssize_t winbind_write_sock(struct winbindd_context *ctx,
+                                 void *buffer,
+                                 size_t count,
+                                 int recursing,
+                                 int need_priv)
 {
-       int fd, result, nwritten;
+       int fd;
+       ssize_t nwritten;
 
        /* Open connection to winbind daemon */
 
@@ -692,6 +696,7 @@ static int winbind_write_sock(struct winbindd_context *ctx, void *buffer,
 
        while(nwritten < count) {
                struct pollfd pfd;
+               ssize_t result;
                int ret;
 
                /* Catch pipe close on other end by checking if a read()