s3: registry: fix query empty valuenames
[amitay/samba.git] / source3 / registry / reg_backend_db.c
index c8241755275c494d7c228a464db001d5891a5ae3..278359fa74f544e505fb9cf339af1f0577818893 100644 (file)
@@ -21,6 +21,8 @@
 /* Implementation of internal registry database functions. */
 
 #include "includes.h"
+#include "registry.h"
+#include "reg_db.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_REGISTRY
@@ -65,7 +67,7 @@ static const char *builtin_registry_paths[] = {
        KEY_HKCU,
        KEY_GP_USER_POLICY,
        KEY_GP_USER_WIN_POLICY,
-       KEY_WINLOGON_GPEXT_PATH,
+       "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\GPExtensions",
        "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors",
        KEY_PROD_OPTIONS,
        "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration",
@@ -1558,7 +1560,7 @@ static int regdb_unpack_values(struct regval_ctr *values, uint8 *buf, int buflen
 
                /* add the new value. Paranoid protective code -- make sure data_p is valid */
 
-               if (*valuename && size && data_p) {
+               if (size && data_p) {
                        regval_ctr_addvalue(values, valuename, type,
                                        (const char *)data_p, size);
                }