dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone
Blob Blame History Raw
From 2f08218f0eb6e069c94401ac439d5d7f5b032564 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Mon, 24 Feb 2014 15:42:15 +0100
Subject: [PATCH 96/97] OPTS: Allow using defaults for blobs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
(cherry picked from commit ddd21d5dc3c89712d9286d1f66f4b2af73651cf2)
---
 src/providers/data_provider_opts.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/providers/data_provider_opts.c b/src/providers/data_provider_opts.c
index 0edadecc12d2e354c590df9d3ed011cb4e44eee0..5a2e3b74da7d4af4326a56a9cd47b7826e4b78e3 100644
--- a/src/providers/data_provider_opts.c
+++ b/src/providers/data_provider_opts.c
@@ -78,6 +78,9 @@ int dp_get_options(TALLOC_CTX *memctx,
             if (tmp) {
                 opts[i].val.blob.data = (uint8_t *)tmp;
                 opts[i].val.blob.length = strlen(tmp);
+            } else if (opts[i].def_val.blob.data != NULL) {
+                opts[i].val.blob.data = opts[i].def_val.blob.data;
+                opts[i].val.blob.length = opts[i].def_val.blob.length;
             } else {
                 opts[i].val.blob.data = NULL;
                 opts[i].val.blob.length = 0;
-- 
1.8.5.3