[PATCH 3/3] setcifsacl: fix endianness of ->size in build_cmdline_aces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The size must also be kept in little-endian.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxx>
---
 setcifsacl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/setcifsacl.c b/setcifsacl.c
index 3178eff..8891844 100644
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -626,8 +626,8 @@ build_cmdline_aces(char **arrptr, int numcaces)
 			goto build_cmdline_aces_ret;
 		}
 
-		cacesptr[i]->size = 1 + 1 + 2 + 4 + 1 + 1 + 6 +
-				(cacesptr[i]->sid.num_subauth * 4);
+		cacesptr[i]->size = htole16(1 + 1 + 2 + 4 + 1 + 1 + 6 +
+					    cacesptr[i]->sid.num_subauth * 4);
 	}
 	return cacesptr;
 
-- 
1.7.12.1

--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux