lib: Make sid_linearize take a uint8_t
[samba.git] / source3 / lib / util_sid.c
index e336510ae403890c22c092a4beb548af387cb381..4b6fb81d7550c0f3eb470160311159727fbdbcf2 100644 (file)
@@ -72,7 +72,7 @@ char *sid_string_tos(const struct dom_sid *sid)
  Write a sid out into on-the-wire format.
 *****************************************************************/  
 
-bool sid_linearize(char *outbuf, size_t len, const struct dom_sid *sid)
+bool sid_linearize(uint8_t *outbuf, size_t len, const struct dom_sid *sid)
 {
        size_t i;
 
@@ -116,9 +116,9 @@ bool non_mappable_sid(struct dom_sid *sid)
 char *sid_binstring_hex_talloc(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
 {
        int len = ndr_size_dom_sid(sid, 0);
-       char buf[len];
+       uint8_t buf[len];
        sid_linearize(buf, len, sid);
-       return hex_encode_talloc(mem_ctx, (const unsigned char *)buf, len);
+       return hex_encode_talloc(mem_ctx, buf, len);
 }
 
 NTSTATUS sid_array_from_info3(TALLOC_CTX *mem_ctx,