summaryrefslogtreecommitdiff
path: root/source3/lib/smbrun.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/smbrun.c')
-rw-r--r--source3/lib/smbrun.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/lib/smbrun.c b/source3/lib/smbrun.c
index 13e330dd97a..6d6d7817f1a 100644
--- a/source3/lib/smbrun.c
+++ b/source3/lib/smbrun.c
@@ -225,10 +225,16 @@ int smbrunsecret(const char *cmd, const char *secret)
*/
int status = 0;
pid_t wpid;
+ size_t towrite;
+ ssize_t wrote;
close(ifd[0]);
/* send the secret */
- write(ifd[1], secret, strlen(secret));
+ towrite = strlen(secret);
+ wrote = write(ifd[1], secret, towrite);
+ if ( wrote != towrite ) {
+ DEBUG(0,("smbrunsecret: wrote %ld of %lu bytes\n",(long)wrote,(unsigned long)towrite));
+ }
fsync(ifd[1]);
close(ifd[1]);