[PATCHES] some additions for libgpo's ini/inf file parsing capabilities

Günther Deschner gd at samba.org
Thu Jan 19 15:53:16 UTC 2017


Hi Andreas,

thanks for pushing but you modified the inital patch in a way that
gp_inifile_init_context_direct() now always fails. Here is a follow-up
fix to address this.

Please review & push

Guenther

On 05/01/17 08:33, Andreas Schneider wrote:
> On Wednesday, 4 January 2017 17:06:48 CET Günther Deschner wrote:
>> Hi,
>>
>> attached some patches to add some extensions to the libgpo ini file
>> parser. This parser will most likely being used to process printer inf
>> files during MS-PAR driver upload for the full PAR RPC server.
>>
>> Please review and push.
> 
> Fixed several issues that it builds with --picky-developer.
> 
> RB+ and pushed to autobuild
> 
> 
> 	Andreas
> 


-- 
Günther Deschner                    GPG-ID: 8EE11688
Red Hat                         gdeschner at redhat.com
Samba Team                              gd at samba.org
-------------- next part --------------
From c9d5fb09dfaa16a3a9717e42e0b519430b42f465 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd at samba.org>
Date: Thu, 19 Jan 2017 16:49:38 +0100
Subject: [PATCH] libgpo: Fix error code check in
 gp_inifile_init_context_direct()

Guenther

Signed-off-by: Guenther Deschner <gd at samba.org>
---
 libgpo/gpo_ini.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libgpo/gpo_ini.c b/libgpo/gpo_ini.c
index 198e8af..c1b1698 100644
--- a/libgpo/gpo_ini.c
+++ b/libgpo/gpo_ini.c
@@ -359,7 +359,7 @@ NTSTATUS gp_inifile_init_context_direct(TALLOC_CTX *mem_ctx,
 {
 	struct gp_inifile_context *gp_ctx = NULL;
 	NTSTATUS status;
-	int rv;
+	bool rv;
 	char *tmp_filename = NULL;
 
 	if (unix_path == NULL || pgp_ctx == NULL) {
@@ -382,7 +382,7 @@ NTSTATUS gp_inifile_init_context_direct(TALLOC_CTX *mem_ctx,
 				   change_section,
 				   store_keyval_pair,
 				   gp_ctx);
-	if (rv != 0) {
+	if (!rv) {
 		return NT_STATUS_NO_SUCH_FILE;
 	}
 
-- 
2.9.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 201 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170119/e6e05424/signature.sig>


More information about the samba-technical mailing list