rpcclient regenum weirdness
Luke Kenneth Casson Leighton
lkcl at switchboard.net
Wed Apr 7 19:57:22 GMT 1999
edan, thx.
2 things. it's either alignment (rpc_parse/parse_reg.c's
reg_io_r_enum_value() function) or it's display/conversion
(lib/util_unistr.c's buffer2_to_uint32(), referenced from
rpcclient/display.c).
a higher log level will show which one it is: one which shows the
breakdown of the reg_io_r_enum_value() parsing (i use level 100). send
relevant section, i'll tell u.
luke
On Thu, 8 Apr 1999, Edan Idzerda wrote:
>
> We occassionally have clever users who find a way to set the refresh
> rate on an NT machine to some unusable value. It's not too hard to
> fix by remotely editing the registry from another NT machine, but
> since I'm proud to say I don't have one of those in my office (or my
> server room) that's not always convenient.
>
>
> But rpcclient doesn't seem to get quite the right values:
>
> regenum "HKLM\SYSTEM\CurrentControlSet\Hardware Profiles\0001\System\CurrentControlSet\Services\s3\Device0"
>
> Key Values
> ----------
> DefaultSettings.BitsPerPel: uint32: 0x00000800 (0x8)
> DefaultSettings.XResolution: uint32: 0x00000004 (0x400)
> DefaultSettings.YResolution: uint32: 0x00000003 (0x300)
> DefaultSettings.VRefresh: uint32: 0x00004b00 (0x4b)
> DefaultSettings.Flags: uint32: 0x00000000 (0)
> DefaultSettings.XPanning: uint32: 0x00000000 (0)
> DefaultSettings.YPanning: uint32: 0x00000000 (0)
>
>
> I put the values as reported by the Registry Editor in parenthesis.
> Those values make more sense--vertical refresh of 75Hz (0x4b) at a
> resolution of 1024x768 (0x400 x 0x300).
>
> The only pattern I see is that it adds two trailing zeros when they
> are not needed, and removes them when they are. Insightful, eh? :)
> Here's a snippet of a log file:
>
> [1999/04/07 12:13:57, 10] lib/util.c:dump_data(3001)
> [000] 6C 05 00 02 03 10 00 00 00 90 00 00 00 0C 00 00 l....... ........
> [010] 00 78 00 00 00 00 00 00 00 32 00 6C 00 B0 54 18 .x...... .2.l..T.
> [020] 00 36 00 00 00 00 00 00 00 19 00 00 00 44 00 65 .6...... .....D.e
> [030] 00 66 00 61 00 75 00 6C 00 74 00 53 00 65 00 74 .f.a.u.l .t.S.e.t
> [040] 00 74 00 69 00 6E 00 67 00 73 00 2E 00 56 00 52 .t.i.n.g .s...V.R
> [050] 00 65 00 66 00 72 00 65 00 73 00 68 00 00 00 6F .e.f.r.e .s.h...o
> [060] 00 F0 48 18 00 04 00 00 00 88 1D 18 00 04 00 00 ..H..... ........
> [070] 00 00 00 00 00 04 00 00 00 4B 00 00 00 08 49 18 ........ .K....I.
> [080] 00 04 00 00 00 10 49 18 00 04 00 00 00 00 00 00 ......I. ........
> [090] 00 .
>
> I see my 4B in there, four bytes from the number 4 in line [070].
>
> rpcclient was built from CVS yesterday under Solaris 2.6 sun4u, gcc 2.8.1.
>
> I'm going to look at it when I have time, but I figured Luke or somebody
> would beat me in a race, and I have yet to find great enjoyment from
> perusing level 10 log files. :) The full log for the intrepid is
> at
> http://www.me.mtu.edu/~edan/d.client
>
> Keep up the good work--I believe you are on a mission from God. ;)
>
> - edan
>
>
>
<a href="mailto:lkcl at samba.org" > Luke Kenneth Casson Leighton </a>
<a href="http://www.cb1.com/~lkcl"> Samba and Network Development </a>
<a href="http://samba.org" > Samba Web site </a>
=====================================================================
Luke Kenneth Casson Leighton | Direct Dial : (678) 443-6183
Systems Engineer / ISS XForce Team | ISS Front Desk: (678) 443-6000
Internet Security Systems, Inc. | ISS Fax : (678) 443-6477
http://www.iss.net/ *Adaptive Network Security for the Enterprise*
ISS Connect - International User Conference - May '99
=====================================================================
More information about the samba-technical
mailing list