From: Maciej ?enczykowski <maze at google.com>
Google-Bug-Id: 9093057
Change-Id: I75a6cdc0619ae95a0220e8387aa54920701f6209
---
usr/kinit/capabilities.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/usr/kinit/capabilities.c b/usr/kinit/capabilities.c
index e743a70fec0f..4e0456ee7407 100644
--- a/usr/kinit/capabilities.c
+++ b/usr/kinit/capabilities.c
@@ -172,9 +172,9 @@ static void do_usermodehelper_file(const char *filename, int
cap_ordinal)
ret = fflush(file);
if (ret != 0)
fail("Failed on file %s to fflush %d\n", filename, ret);
- sprintf(buf, "%u %u", lo32, hi32);
- ret = fwrite(buf, 1, strlen(buf) + 1, file);
- if (ret != 0)
+ sprintf(buf, "%u %u\n", lo32, hi32);
+ ret = fwrite(buf, 1, strlen(buf), file);
+ if (ret != strlen(buf))
fail("Failed to commit usermode helper bitmasks: %d\n", ret);
/* Cleanup */
--
1.8.2.1