Fix const.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 15 Apr 2008 20:19:05 +0000 (22:19 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 15 Apr 2008 20:19:05 +0000 (22:19 +0200)
(This used to be commit b74fc23825a54eb101b413ee76b21ee605dfb16c)

source4/lib/registry/interface.c
source4/lib/registry/patchfile_preg.c

index 06b002859d4e3875acd57847dab0659f65a88907..0678af52377cb7760588234b1fa5c4ed87c0f11a 100644 (file)
@@ -284,7 +284,7 @@ _PUBLIC_ WERROR reg_key_flush(struct registry_key *key)
 }
 
 _PUBLIC_ WERROR reg_set_sec_desc(struct registry_key *key,
-                                struct security_descriptor *security)
+                                const struct security_descriptor *security)
 {
        if (key == NULL)
                return WERR_INVALID_PARAM;
index c2bc8d10b351c33f7d215b55be40a8dd93f22cdb..bb46495c19c5a21e180cc4bd934c25d3b5e6d1e6 100644 (file)
@@ -165,7 +165,7 @@ _PUBLIC_ WERROR reg_preg_diff_save(TALLOC_CTX *ctx, const char *filename,
                data->fd = STDOUT_FILENO;
        }
 
-       memcpy(preg_header.hdr, "PReg", 4);
+       strncpy(preg_header.hdr, "PReg", 4);
        SIVAL(&preg_header, 4, 1);
        write(data->fd, (uint8_t *)&preg_header,8);