samba/samba-3.0.20-regcreatekey_winxp_v1.patch
fenlason ea54ad0f60 * Mon Aug 22 2005 Jay Fenlason <fenlason@redhat.com> 3.0.20-2
- New upstream release
  Includes five upstream patches -bug3010_v1, -groupname_enumeration_v3,
    -regcreatekey_winxp_v1, -usrmgr_groups_v1, and -winbindd_v1
  This obsoletes the -pie and -delim patches
  the -warning and -gcc4 patches are obsolete too
  The -man, -passwd, and -smbspool patches were updated to match 3.0.20pre1
  Also, the -quoting patch was implemented differently upstream
  There is now a umount.cifs executable and manpage
  We run autogen.sh as part of the build phase
  The testprns command is now gone
  libsmbclient now has a man page
- Include -bug106483 patch to close
  bz#106483 smbclient: -N negates the provided password, despite documentation
- Added the -warnings patch to quiet some compiler warnings.
- Removed many obsolete patches from CVS.
2005-09-12 20:40:11 +00:00

125 lines
4.2 KiB
Diff

diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/confdefs.h samba-3.0.20-new/source/confdefs.h
diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/include/rpc_reg.h samba-3.0.20-new/source/include/rpc_reg.h
--- samba-3.0.20-orig/source/include/rpc_reg.h 2005-07-28 08:19:50.000000000 -0500
+++ samba-3.0.20-new/source/include/rpc_reg.h 2005-09-01 09:03:30.000000000 -0500
@@ -217,14 +217,17 @@
POLICY_HND handle;
UNISTR4 name;
UNISTR4 key_class;
- uint32 reserved;
+ uint32 options;
uint32 access;
+
+ /* FIXME! collapse all this into one structure */
uint32 *sec_info;
uint32 ptr2;
BUFHDR hdr_sec;
uint32 ptr3;
SEC_DESC_BUF *data;
- uint32 unknown_2; /* 0x0000 0000 */
+
+ uint32 *disposition;
} REG_Q_CREATE_KEY_EX;
typedef struct {
diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/registry/reg_db.c samba-3.0.20-new/source/registry/reg_db.c
--- samba-3.0.20-orig/source/registry/reg_db.c 2005-08-07 18:09:57.000000000 -0500
+++ samba-3.0.20-new/source/registry/reg_db.c 2005-09-01 09:05:05.000000000 -0500
@@ -49,6 +49,7 @@
"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib\\009",
"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors",
"HKLM\\SYSTEM\\CurrentControlSet\\Control\\ProductOptions",
+ "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration",
"HKLM\\SYSTEM\\CurrentControlSet\\Services\\TcpIp\\Parameters",
"HKLM\\SYSTEM\\CurrentControlSet\\Services\\Netlogon\\Parameters",
"HKU",
@@ -149,6 +150,11 @@
regval_ctr_init( &values );
regdb_fetch_values( builtin_registry_values[i].path, &values );
+
+ /* preserve existing values across restarts. Only add new ones */
+
+ if ( !regval_ctr_key_exists( &values, builtin_registry_values[i].valuename ) )
+ {
switch( builtin_registry_values[i].type ) {
case REG_DWORD:
regval_ctr_addvalue( &values,
@@ -172,6 +178,7 @@
builtin_registry_values[i].type));
}
regdb_store_values( builtin_registry_values[i].path, &values );
+ }
regval_ctr_destroy( &values );
}
@@ -191,8 +198,6 @@
if ( tdb_reg )
return True;
- /* placeholder tdb; reinit upon startup */
-
if ( !(tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )
{
tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
@@ -209,14 +214,15 @@
vers_id = tdb_fetch_int32(tdb_reg, vstring);
if ( vers_id != REGVER_V1 ) {
+ /* any upgrade code here if needed */
+ }
- /* create the registry here */
+ /* always setup the necessary keys and values */
if ( !init_registry_data() ) {
DEBUG(0,("init_registry: Failed to initiailize data in registry!\n"));
return False;
}
- }
return True;
}
diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/rpc_parse/parse_reg.c samba-3.0.20-new/source/rpc_parse/parse_reg.c
--- samba-3.0.20-orig/source/rpc_parse/parse_reg.c 2005-07-28 08:19:48.000000000 -0500
+++ samba-3.0.20-new/source/rpc_parse/parse_reg.c 2005-09-01 09:03:30.000000000 -0500
@@ -227,7 +227,7 @@
q_c->ptr2 = 1;
init_buf_hdr(&q_c->hdr_sec, sec_buf->len, sec_buf->len);
q_c->ptr3 = 1;
- q_c->unknown_2 = 0x00000000;
+ q_c->disposition = TALLOC_P( get_talloc_ctx(), uint32 );
}
/*******************************************************************
@@ -259,7 +259,7 @@
if(!prs_align(ps))
return False;
- if(!prs_uint32("reserved", ps, depth, &q_u->reserved))
+ if(!prs_uint32("options", ps, depth, &q_u->options))
return False;
if(!prs_uint32("access", ps, depth, &q_u->access))
return False;
@@ -267,16 +267,15 @@
if(!prs_pointer("sec_info", ps, depth, (void**)&q_u->sec_info, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32))
return False;
+ if ( q_u->sec_info ) {
if(!prs_uint32("ptr2", ps, depth, &q_u->ptr2))
return False;
- if(!reg_io_hdrbuf_sec(q_u->ptr2, &q_u->ptr3, &q_u->hdr_sec, q_u->data,
- ps, depth))
+ if(!reg_io_hdrbuf_sec(q_u->ptr2, &q_u->ptr3, &q_u->hdr_sec, q_u->data, ps, depth))
return False;
+ }
-#if 0
- if(!prs_uint32("unknown_2", ps, depth, &q_u->unknown_2))
+ if(!prs_pointer("disposition", ps, depth, (void**)&q_u->disposition, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32))
return False;
-#endif
return True;
}