libgpo/security_CSE: fix unicode preamble check of SecEdit/GptTmpl.inf files.
authorGünther Deschner <gd@samba.org>
Tue, 10 Dec 2013 23:50:03 +0000 (00:50 +0100)
committerAndreas Schneider <asn@samba.org>
Thu, 12 Dec 2013 12:34:51 +0000 (13:34 +0100)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libgpo/gpext/security.c

index b68840d2f6a8b102ec6d334aa14c04117e9592f9..dba1e9b72fedc3d1f090995d7f4072d59d8e5866 100644 (file)
@@ -64,7 +64,7 @@ static NTSTATUS gpttmpl_parse_header(struct gp_inifile_context *ini_ctx,
        char *signature = NULL;
        NTSTATUS result;
        int version;
-       int is_unicode;
+       bool is_unicode = false;
 
        if (!ini_ctx) {
                return NT_STATUS_INVALID_PARAMETER;
@@ -89,7 +89,7 @@ static NTSTATUS gpttmpl_parse_header(struct gp_inifile_context *ini_ctx,
                *version_out = version;
        }
 
-       result = gp_inifile_getint(ini_ctx, GPTTMPL_SECTION_UNICODE
+       result = gp_inifile_getbool(ini_ctx, GPTTMPL_SECTION_UNICODE
                        ":"GPTTMPL_PARAMETER_UNICODE, &is_unicode);
        if (!NT_STATUS_IS_OK(result) || !is_unicode) {
                return NT_STATUS_INTERNAL_DB_CORRUPTION;