Bug 7740 - profiles utility and net_rpc_registry can't get rootkey. old prs_ functions do not work
Summary: profiles utility and net_rpc_registry can't get rootkey. old prs_ functions d...
Status: NEW
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: User & Group Accounts (show other bugs)
Version: 3.5.0
Hardware: x64 Linux
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-10-19 09:26 UTC by Björn Baumbach
Modified: 2010-10-19 09:26 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Baumbach 2010-10-19 09:26:08 UTC
Since 3.2 the profiles utility doesn't work.

Somebody should do the rpc (un-)marshall-stuff with the idl-system instead of the deprecated prs_* functions.
--> This is the last place where the prs_* are used.

Programm output:
bbaumba@laila # profiles ~/profile/NTUSER.DAT
ndr_pull_error(11): ndr_pull_relative_ptr1 rel_offset(27263236) > ndr->data_size(4096)
ndr_pull_security_descriptor failed: NDR_ERR_BUFSIZE
prs_grow: Buffer overflow - unable to expand buffer by 36 bytes.
regfio_rootkey: corrupt registry file ?  No root key record located
Could not get rootkey

The error occurs at the call of regfio_rootkey() in utils/profiles.c utils/net_rpc_registry.c 

Program exited with code 03.
(gdb) break ndr_pull_security_descriptor
Breakpoint 1 at 0x7ffff7f4360e: file librpc/gen_ndr/ndr_security.c, line 752.
(gdb) run
[Thread debugging using libthread_db enabled]

Breakpoint 1, ndr_pull_security_descriptor (ndr=0x7ffff8228f80, ndr_flags=3, r=0x7ffff8228f00) at librpc/gen_ndr/ndr_security.c:752
(gdb) bt
#0  ndr_pull_security_descriptor (ndr=0x7ffff8228f80, ndr_flags=3, r=0x7ffff8228f00) at librpc/gen_ndr/ndr_security.c:752
#1  0x00007ffff7f3d8bc in ndr_pull_struct_blob (blob=0x7fffffffda20, mem_ctx=0x7ffff8228f00, p=0x7ffff8228f00, fn=0x7ffff7f435ef <ndr_pull_security_descriptor>) at ../librpc/ndr/ndr.c:852
#2  0x00007ffff7f2f499 in unmarshall_sec_desc (mem_ctx=0x7ffff8224700, data=0x7ffff82249d0 "hbin", len=4096, psecdesc=0x7ffff8228e98) at lib/secdesc.c:324
#3  0x00007ffff7f5b87d in hbin_prs_sk_rec (desc=0x7ffff7fd8b39 "sk_rec", hbin=0x7ffff8224920, depth=2, sk=0x7ffff8228e60) at registry/regfio.c:772
#4  0x00007ffff7f5c965 in hbin_prs_key (file=0x7ffff8223060, hbin=0x7ffff8224920, nk=0x7ffff8224830) at registry/regfio.c:1078
#5  0x00007ffff7f5cc4f in next_nk_record (file=0x7ffff8223060, hbin=0x7ffff8224920, nk=0x7ffff8224830, eob=0x7fffffffdb87) at registry/regfio.c:1158
#6  0x00007ffff7f5d693 in regfio_rootkey (file=0x7ffff8223060) at registry/regfio.c:1395
#7  0x00007ffff7e884d3 in main (argc=2, argv=0x7fffffffde58) at utils/profiles.c:292