Author: jra Date: 2007-06-15 23:47:40 +0000 (Fri, 15 Jun 2007) New Revision: 23512
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23512 Log: Fix conflict in #define for SECDESC_PREFIX. Ensure all reg #defines use "REG_" prefix. Michael - please check gcc warnings on compiles. Jeremy. Modified: branches/SAMBA_3_0/source/include/reg_db.h branches/SAMBA_3_0/source/registry/reg_db.c branches/SAMBA_3_0_26/source/include/reg_db.h branches/SAMBA_3_0_26/source/registry/reg_db.c Changeset: Modified: branches/SAMBA_3_0/source/include/reg_db.h =================================================================== --- branches/SAMBA_3_0/source/include/reg_db.h 2007-06-15 22:06:50 UTC (rev 23511) +++ branches/SAMBA_3_0/source/include/reg_db.h 2007-06-15 23:47:40 UTC (rev 23512) @@ -25,7 +25,7 @@ #define REGVER_V1 1 /* first db version with write support */ -#define VALUE_PREFIX "SAMBA_REGVAL" -#define SECDESC_PREFIX "SAMBA_SECDESC" +#define REG_VALUE_PREFIX "SAMBA_REGVAL" +#define REG_SECDESC_PREFIX "SAMBA_SECDESC" #endif /* _REG_DB_H */ Modified: branches/SAMBA_3_0/source/registry/reg_db.c =================================================================== --- branches/SAMBA_3_0/source/registry/reg_db.c 2007-06-15 22:06:50 UTC (rev 23511) +++ branches/SAMBA_3_0/source/registry/reg_db.c 2007-06-15 23:47:40 UTC (rev 23512) @@ -444,7 +444,7 @@ goto fail; } - pstr_sprintf( path, "%s/%s/%s", VALUE_PREFIX, key, + pstr_sprintf( path, "%s/%s/%s", REG_VALUE_PREFIX, key, oldkeyname ); normalize_reg_path( path ); @@ -637,7 +637,7 @@ DEBUG(10,("regdb_fetch_values: Looking for value of key [%s] \n", key)); - pstr_sprintf( keystr, "%s/%s", VALUE_PREFIX, key ); + pstr_sprintf( keystr, "%s/%s", REG_VALUE_PREFIX, key ); normalize_reg_path( keystr ); data = tdb_fetch_bystring( tdb_reg->tdb, keystr ); @@ -682,7 +682,7 @@ SMB_ASSERT( len == data.dsize ); - pstr_sprintf( keystr, "%s/%s", VALUE_PREFIX, key ); + pstr_sprintf( keystr, "%s/%s", REG_VALUE_PREFIX, key ); normalize_reg_path( keystr ); ret = tdb_trans_store_bystring(tdb_reg->tdb, keystr, data, TDB_REPLACE); @@ -701,7 +701,7 @@ DEBUG(10, ("regdb_get_secdesc: Getting secdesc of key [%s]\n", key)); - if (asprintf(&tdbkey, "%s/%s", SECDESC_PREFIX, key) == -1) { + if (asprintf(&tdbkey, "%s/%s", REG_SECDESC_PREFIX, key) == -1) { return WERR_NOMEM; } normalize_dbkey(tdbkey); @@ -744,7 +744,7 @@ ZERO_STRUCT(ps); - if (!(tdbkey = talloc_asprintf(mem_ctx, "%s/%s", SECDESC_PREFIX, + if (!(tdbkey = talloc_asprintf(mem_ctx, "%s/%s", REG_SECDESC_PREFIX, key))) { goto done; } Modified: branches/SAMBA_3_0_26/source/include/reg_db.h =================================================================== --- branches/SAMBA_3_0_26/source/include/reg_db.h 2007-06-15 22:06:50 UTC (rev 23511) +++ branches/SAMBA_3_0_26/source/include/reg_db.h 2007-06-15 23:47:40 UTC (rev 23512) @@ -25,7 +25,7 @@ #define REGVER_V1 1 /* first db version with write support */ -#define VALUE_PREFIX "SAMBA_REGVAL" -#define SECDESC_PREFIX "SAMBA_SECDESC" +#define REG_VALUE_PREFIX "SAMBA_REGVAL" +#define REG_SECDESC_PREFIX "SAMBA_SECDESC" #endif /* _REG_DB_H */ Modified: branches/SAMBA_3_0_26/source/registry/reg_db.c =================================================================== --- branches/SAMBA_3_0_26/source/registry/reg_db.c 2007-06-15 22:06:50 UTC (rev 23511) +++ branches/SAMBA_3_0_26/source/registry/reg_db.c 2007-06-15 23:47:40 UTC (rev 23512) @@ -444,7 +444,7 @@ goto fail; } - pstr_sprintf( path, "%s/%s/%s", VALUE_PREFIX, key, + pstr_sprintf( path, "%s/%s/%s", REG_VALUE_PREFIX, key, oldkeyname ); normalize_reg_path( path ); @@ -637,7 +637,7 @@ DEBUG(10,("regdb_fetch_values: Looking for value of key [%s] \n", key)); - pstr_sprintf( keystr, "%s/%s", VALUE_PREFIX, key ); + pstr_sprintf( keystr, "%s/%s", REG_VALUE_PREFIX, key ); normalize_reg_path( keystr ); data = tdb_fetch_bystring( tdb_reg->tdb, keystr ); @@ -682,7 +682,7 @@ SMB_ASSERT( len == data.dsize ); - pstr_sprintf( keystr, "%s/%s", VALUE_PREFIX, key ); + pstr_sprintf( keystr, "%s/%s", REG_VALUE_PREFIX, key ); normalize_reg_path( keystr ); ret = tdb_trans_store_bystring(tdb_reg->tdb, keystr, data, TDB_REPLACE); @@ -701,7 +701,7 @@ DEBUG(10, ("regdb_get_secdesc: Getting secdesc of key [%s]\n", key)); - if (asprintf(&tdbkey, "%s/%s", SECDESC_PREFIX, key) == -1) { + if (asprintf(&tdbkey, "%s/%s", REG_SECDESC_PREFIX, key) == -1) { return WERR_NOMEM; } normalize_dbkey(tdbkey); @@ -744,7 +744,7 @@ ZERO_STRUCT(ps); - if (!(tdbkey = talloc_asprintf(mem_ctx, "%s/%s", SECDESC_PREFIX, + if (!(tdbkey = talloc_asprintf(mem_ctx, "%s/%s", REG_SECDESC_PREFIX, key))) { goto done; }