1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

857 Commits

Author SHA1 Message Date
Andrew Tridgell
80c4543409 fixed the unmarshalling of the queryaliasmem SAMR call 0001-01-01 00:00:00 +00:00
Andrew Bartlett
d1dde5f684 Don't fault on error returns (ptr == 0) for this LSA query.
(for example, query to non-dc)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Simo Sorce
4c6d461a85 Some progress towards gums and tdbsam2
genparser works fine, and it is a marvelous tool to store objects in tdb :)
0001-01-01 00:00:00 +00:00
Gerald Carter
52ef84b534 add #define for the max device name length in a DEVICEMODE 0001-01-01 00:00:00 +00:00
Gerald Carter
21ec2b6ba3 add #define for the max device name length in a DEVICEMODE 0001-01-01 00:00:00 +00:00
Gerald Carter
7377d671e8 * CR1868: only send a change notify message if we have something
that changed that the client is monitoring.

* couple of comments abnout how we need to validate driver names
  on SetPrinter() and AddPrinter()

* up the debug level on some overly verbose dev mode parsing messages
0001-01-01 00:00:00 +00:00
Gerald Carter
e8939165b7 * CR1868: only send a change notify message if we have something
that changed that the client is monitoring.

* couple of comments abnout how we need to validate driver names
  on SetPrinter() and AddPrinter()

* up the debug level on some overly verbose dev mode parsing messages
0001-01-01 00:00:00 +00:00
Tim Potter
a20aba0999 Merge: const fixes. 0001-01-01 00:00:00 +00:00
Tim Potter
018733eedd More const fixes and flow on fixes from yesterday's const-fest. 0001-01-01 00:00:00 +00:00
Gerald Carter
31272d3b6b Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.

Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
0001-01-01 00:00:00 +00:00
Gerald Carter
33c7b75225 Progress on CR 601
cache the printer_info_2 with the open printer handle.
cache is invalidated on a mod_a_printer() call **on that smbd**.

Yes, this means that the window for admins to step on each other
from different clients just got larger, but since handles a generally
short lived this is probably ok.
0001-01-01 00:00:00 +00:00
Gerald Carter
fde6ef7cc6 couple of merges from APP_HEAD
* performance optimization in enumprinterdataex() when keyname is empty
  * fix a few typos in comments
  * reload services after addprinter_command()

dump registry data in ascii when the key is REG_SZ or REG_MULTI_SZ
0001-01-01 00:00:00 +00:00
Gerald Carter
3fc90ea1d9 couple of merges from APP_HEAD
* performance optimization in enumprinterdataex() when keyname is empty
  * fix a few typos in comments
  * reload services after addprinter_command()

dump registry data in ascii when the key is REG_SZ or REG_MULTI_SZ
0001-01-01 00:00:00 +00:00
Martin Pool
5d09aea6f7 Check return code of string_to_sid. (Merge from HEAD) 0001-01-01 00:00:00 +00:00
Martin Pool
5a59727278 init_dom_sid2s: Check return code from string_to_sid. Skip tokens
that are not valid SIDs.
0001-01-01 00:00:00 +00:00
Jeremy Allison
4c3ee228fc Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
a823fee5b4 Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
2ef72f9500 removed a duplicate copy of smb_io_sid_array() 0001-01-01 00:00:00 +00:00
Andrew Tridgell
aa2abacaf4 added server stubs for lsa_enum_acct_with_right 0001-01-01 00:00:00 +00:00
Andrew Tridgell
3ddb5fb0dd added the 'lsaenumacctwithright' command to rpcclient. This allows you
to lookup what SIDs have a particular privilege (that is how
privileges are stored).
0001-01-01 00:00:00 +00:00
Andrew Tridgell
64ac6c2bcb added the LSA privileges server backend stubs. Right now they just log
what was requested.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
9bcdb869e5 Merge from HEAD: Send the session key to the client, allowing it to perform SMB
signing.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
574e8a8ab7 Send the user's session key in the SAMLOGON reply, so that a member server can
use smb signing.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
1e752b48a1 Merge tpot's changes to request the correct sizes for user dispinfo
from HEAD. I had to do this for him as he was *so* tired, the poor
chap, plus he has this bad leg, plus the dog ate his homework etc. etc.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
c3b077f763 Pass down max_size parameter to init_samr_q_query_dispinfo() instead
of hardcoding it to 0xffff.
0001-01-01 00:00:00 +00:00
Jeremy Allison
49739be1e2 Merge tridge's client priv code from HEAD.
Jeremy
0001-01-01 00:00:00 +00:00
Andrew Tridgell
bf99440398 added LsaRemoveAccountRights
this now gives us complete remove privileges control in the client
libs, so we are in good shape for starting on the server side.
0001-01-01 00:00:00 +00:00
Jeremy Allison
30a33920b4 Merging tridge's privillage client changes from HEAD.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
2e5e659e09 cleaned up the lsa_enum_acct_rights function and added a
lsa_add_acct_rights function.

This allows us to add privileges remotely to accounts using rpcclient.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e3d00fa47d reverted this patch till I sort out the craziness with UNIHDR 0001-01-01 00:00:00 +00:00
Andrew Tridgell
b9eff31b14 This removes the 3rd argument from init_unistr2(). There were 240
calls to init_unistr2() in the code and every one of them got the 3rd
argument incorrect, so I thought it best just to remove the argument.

The incorrect usage was caused by callers using strlen() to determine
the length of the string. The 3rd argument to init_unistr2() was
supposed to be the character length, not the byte length of the
string, so for non-english this could come out wrong.

I also removed the bogus 'always allocate at least 256 bytes'
hack. There may be some code that relies on this, but if there is then
the code is broken and needs fixing.
0001-01-01 00:00:00 +00:00
Gerald Carter
7a4c874842 merging some rpcclient and net functionality from HEAD 0001-01-01 00:00:00 +00:00
Andrew Tridgell
65bac11d71 added cli_lsa_enum_account_rights() call. Note that this is in
principal similar to the existing cli_lsa_enum_privsaccount() call,
except that cli_lsa_enum_account_rights() doesn't require a call to
open_account first. There is also the minor matter that
cli_lsa_enum_account_rights() works whereas
cli_lsa_enum_privsaccount() doesn't!

this call can be used to find what privileges an account or group
has. This is a first step towards proper privileges support in Samba.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
d7452e73b5 Fix typo, and the build. 0001-01-01 00:00:00 +00:00
Richard Sharpe
9a38e37811 Make sure that those cleanups actually went in. 0001-01-01 00:00:00 +00:00
Richard Sharpe
fd847aa936 Now that I am running config.developer, I decided to get rif of some warnings:
1. reboot in parse_reg and cli_reg was shadowing a definition on FreeBSD
   4.3 from system includes.

2. Added a bit of const to places.

3. Made sure internal functions were declared where needed.
0001-01-01 00:00:00 +00:00
Tim Potter
6ed4d80baa Remove dead function. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
b596283352 Missed from previous commit - merge from HEAD the changes to the remote
shutdown struct - it's 2 byte-boolean flags, not 16 bits.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Bartlett
92a777d0ea BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jeremy Allison
3b453a5963 Merge tridge's fix :
the 'padding' field in the query domain info reply is not a padding
field at all. It seems to be an optional 12 byte structure of some
kind. mkaplan found a situation where the structure was not present at
all (depending on ptr_0)
Jeremy.
0001-01-01 00:00:00 +00:00
Simo Sorce
c5892b656d the shutdown call does not have a 16 bit flags, but 2 byte representing booleans
this commit change the structure and code to reflect this

some test revelead I'm right.

some other revelead currently the abort shutdown does not work against my test machine even if it returns successfully ... need investigation
0001-01-01 00:00:00 +00:00
Andrew Tridgell
d7f18c60f7 the 'padding' field in the query domain info reply is not a padding
field at all. It seems to be an optional 12 byte structure of some
kind. mkaplan found a situation where the structure was not present at
all (depending on ptr_0)
0001-01-01 00:00:00 +00:00
Jeremy Allison
842e08e52a Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
09a218a9f6 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
872c152d35 Merge of comment about apparent spoolss_io_user_info weirdness. 0001-01-01 00:00:00 +00:00
Tim Potter
bbb0b2ee40 Guy Harris points out that the level and ptr fields in a
SPOOL_USER_CTR look like they should be transposed.  We don't make use
of the user level information (what is it used for??) so I haven't
changed any code, just added a comment.
0001-01-01 00:00:00 +00:00
Jim McDonough
60502d9d42 Support printer info 7, used for publishing 0001-01-01 00:00:00 +00:00
Jim McDonough
3c9726454e Support printer info 7, used for publishing 0001-01-01 00:00:00 +00:00
Jeremy Allison
19f86f1f72 Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
5d5762d178 Lots of fixes for error paths where tdb_fetch() data need freeing.
Found via a post from Arcady Chernyak <Arcady.Chernyak@efi.com>.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f755711df8 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
82b8f749a3 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jim McDonough
f6e21ba4c7 Sync with HEAD to get enumprinterkey api. 0001-01-01 00:00:00 +00:00
Jeremy Allison
a4c8c8f3b7 Being tpot's janitor again.... checking in things only checked into HEAD.
We are meant to be keeping 3.0 up to date...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
10024ed06e Merge of scalable printing code fix... Needs testing.
Also tidied up some of Richard's code (I don't think he uses the compiler
flags -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual like
I do :-) :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d030df7643 Merge of scalable printing code fix... Needs testing.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
28871bb696 For a BUFFER5, don't parse the buffer if the buffer length is zero. 0001-01-01 00:00:00 +00:00
Tim Potter
f56ce473b6 Client side functions for enumprinterkey. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
2044d60bbe Merge passdb from HEAD -> 3.0
The work here includes:
 - metze' set/changed patch, which avoids making changes to ldap on unmodified
attributes.

 - volker's group mapping in passdb patch

 - volker's samsync stuff
 - volkers SAMR changes.

 - mezte's connection caching patch

 - my recent changes (fix magic root check, ldap ssl)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Volker Lendecke
32d6bcf3ac This fixes some bugs for NT4 usrmgr.exe
Volker
0001-01-01 00:00:00 +00:00
Tim Potter
0f2ddfcd95 Merge NULL relstr fix from HEAD. 0001-01-01 00:00:00 +00:00
Tim Potter
e62c6bf066 When unmarshalling a relstr, don't unmarshall the string data if the
offset is zero.  Previously we were jumping to the start of the
parse buffer (i.e offset zero) and reading string data until we hit
a terminating NULL.

Test case: in a PRINTER_INFO_0 structure, the servername field may be
NULL when doing an enumprinters with flags = PRINTER_ENUM_LOCAL.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
7f237bde21 Nice *big* patch from metze.
The actual design change is relitivly small however:

It all goes back to jerry's 'BOOL store', added to many of the elements in a
SAM_ACCOUNT.  This ensured that smb.conf defaults did not get 'fixed' into
ldap.  This was a great win for admins, and this patch follows in the same way.

This patch extends the concept - we don't store values back into LDAP unless
they have been changed.  So if we read a value, but don't update it, or we
read a value, find it's not there and use a default, we will not update
ldap with that value.  This reduced clutter in our LDAP DB, and makes it
easier to change defaults later on.

Metze's particular problem was that when we 'write back' an unchanged value,
we would clear any muliple values in that feild.  Now he can still have his
mulitivalued 'uid' feild, without Samba changing it for *every* other
operation.

This also applies to many other attributes, and helps to eliminate a nasty
race condition.  (Time between get and set)

This patch is big, and needs more testing, but metze has tested usrmgr, and
I've fixed some pdbedit bugs, and tested domain joins, so it isn't compleatly
flawed ;-).

The same system will be introduced into the SAM code shortly, but this fixes
bugs that people were coming across in production uses of Samba 3.0/HEAD, hence
it's inclusion here.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
f149a5a547 missing prs_align()'s 0001-01-01 00:00:00 +00:00
Gerald Carter
33f4a2fe1c missing prs_align()'s 0001-01-01 00:00:00 +00:00
Gerald Carter
028477e352 merge of working dsrolegetprimdominfo() client code from APP_HEAD 0001-01-01 00:00:00 +00:00
cvs2svn Import User
7950dfc795 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'. 0001-01-01 00:00:00 +00:00
Gerald Carter
f70caa25e4 merge of working dsrolegetprimdominfo() client code from APP_HEAD 0001-01-01 00:00:00 +00:00
Gerald Carter
1cfd2ee433 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
0001-01-01 00:00:00 +00:00
Gerald Carter
38c9e42998 merge of new client side support the Win2k LSARPC UUID in rpcbind
from APP_HEAD
0001-01-01 00:00:00 +00:00
Jeremy Allison
cb89bcc935 HEAD and APP-HEAD spoolss parsing was out of sync. This MUST NOT HAPPEN !
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e42b76337b HEAD and APP-HEAD spoolss parsing was out of sync. This MUST NOT HAPPEN !
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
e026b84815 syncing up with HEAD again.... 0001-01-01 00:00:00 +00:00
Andrew Bartlett
ab878b6cc4 Patch from "Stefan (metze) Metzmacher" <metze@metzemix.de> to do a *much*
better job of working with usrmgr.   Previously we were blanking out entires,
and all sort of mischif.

The new patch (which I've now had a chance to test/modify) also takes care not
to expand % values (ie we go \\%L\%U -> \\server\user, we don't want to store
\\server\user back) and to correctly notice 'not set' compared to 'null string'
etc.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release 0001-01-01 00:00:00 +00:00
Volker Lendecke
8c41b5cd1b Change parsing of policy and privs delta to what Ethereal says.
Volker
0001-01-01 00:00:00 +00:00
Simo Sorce
eda0e7589f wrong alignment size calculation
spot by Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>
0001-01-01 00:00:00 +00:00
Tim Potter
2d227bdce2 Display debug data we are marshalling/unmarshalling a UNISTR in a
similar format to UNISTR2.
0001-01-01 00:00:00 +00:00
Tim Potter
88653130bc A netshareenum reply always contains an enum_hnd. win2k returns zero
total entries on an error whereas nt4 must send uninitialised data so
we didn't catch this one before.
0001-01-01 00:00:00 +00:00
Tim Potter
47b8ec632e Fix typo in comment. 0001-01-01 00:00:00 +00:00
Tim Potter
6d792c683d Implemented client function for deleteprinterdataex. 0001-01-01 00:00:00 +00:00
Tim Potter
6a1953f243 Implemented some more client side spoolss functions:
- getprinterdataex(), setprinterdataex(), enumprinterdataex()

Pass data type down to setprinterdata() fn instead of hardcoding REG_SZ.

Did some trickyness to get enumprinterdataex replies unmarshalled
properly.  The code seems to have been written to require the number
of entries returned before unpacking said entries.  Skip to the end of
the response and read the number of entries then jump back and process
the printer data.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
52db44b5c0 Avoid writing unitialised bytes to the wire (and consequent valgrind warnings)
by zeroing them out if they don't have meaning.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
ec37633548 fix up print portion of registry. Merge from APP_HEAD. 0001-01-01 00:00:00 +00:00
Gerald Carter
cb13d334a5 merge of phant0m key fix from APP_HEAD 0001-01-01 00:00:00 +00:00
Andrew Tridgell
5185f495d0 removed a debug line 0001-01-01 00:00:00 +00:00
Volker Lendecke
23a4f6991e There's more work to be done on samsync. Intermediate commit, now
I get all the groups at least.

Volker
0001-01-01 00:00:00 +00:00
Gerald Carter
901769acc3 fix 2 byte alignment/offset bug that prevented Win2k/XP clients
from receiving all the printer data in EnumPrinterDataEx().
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
23501ea971 some cleanup while working on the NETLOGON pipe.
smb_io_chal() did a prs_align() but a challenge is an array of bytes.
and all code calling smb_io_chal() played with the alignment to not align !

I'm confident in my change, but I would *really* like if jeremy could look
at that.

	J.F.
0001-01-01 00:00:00 +00:00
Tim Potter
1f29276c2f Added some new delta types discovered by Ronnie from ethereal"
- SAM_DELTA_RENAME{USER,GROUP,ALIAS}
 - SAM_DELTA_DELETE{USER,GROUP}

Renamed some of the unknown delta types and their unmarshalling functions:

 - SAM_DELTA_TRUST_DOMS
 - SAM_DELTA_SECRET_INFO
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e4cb106d2e added a 'net rpc samdump' command for dumping the whole sam via
samsync operations (as a BDC)
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
2f68d6f5ec NETLOGON NetServerAuthenticate3 include and parser file
J.F.
0001-01-01 00:00:00 +00:00
Jelmer Vernooij
3928578b52 sync 3.0 branch with head 0001-01-01 00:00:00 +00:00
Gerald Carter
d59b0eb123 * the printing code should now be back to the working state it was
before the swap from NT_PRINTER_PARAM to REGISTRY_VALUE.

* XxxPrinterDataEx() functions have not been expanded to support
  keys other than SPOOL_PRINTERDATA_KEY yet

* fixed apparent long standing bug regarding the dependentfiles
  list in the DRIVER_INFO struct
0001-01-01 00:00:00 +00:00
Gerald Carter
7ba7c04c0e Fairly large change to printing code.
* removed support for PHANTOM_DEVMODE printer data

* s/NT_PRINTER_PARAM/REGISTRY_VALUE/g - This was a good bit
  of work.  Everything seems stable, but is not complete.

* support for printer data keys other than PrinterDriverData
  in the store and fetch routines.  Still needs to be plugged
  into the XxxPrinterDataEx() calls.

Tested against NT4.0 & 2k.  Like I said, it's not done, but doesn't
crash so it shouldn't upset anyone (unless you're trying to build
a Samba printer server off of HEAD).  More work to come.  Should
settle by Monday.


jerry
0001-01-01 00:00:00 +00:00
Tim Potter
482d873c26 Rename unknown_0 field in create_user2 reply in the actual struct. 0001-01-01 00:00:00 +00:00
Tim Potter
8bca308583 The unknown_0 field in a CREATE_USER2 reply is the access granted. 0001-01-01 00:00:00 +00:00
Gerald Carter
fb822e97cb added comment about a new specversion seen from client.
Device mode size is still the same though.




jerry
0001-01-01 00:00:00 +00:00
Jim McDonough
c3b05b21a0 Add lsa 0x2e (queryinfo2) client side 0001-01-01 00:00:00 +00:00
Jim McDonough
ed2370b91f Add client side support for samr connect4 (0x3e). Seems to have one
additional parm compared to samr connect, but I've only seen 0x00000002
in that field...
0001-01-01 00:00:00 +00:00
Gerald Carter
11ddfd9cfa printing change notification merge from APPLIANCE_HEAD 0001-01-01 00:00:00 +00:00
Tim Potter
fe43c2ac2d Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD. 0001-01-01 00:00:00 +00:00
Jim McDonough
2663446349 Add SAMR 0x3e, which is samr_connect4. Seems to be the same as our
existing connect (which I've been told is really connect2), with one
extra dword.  We've only seen 0x00000002 there...
0001-01-01 00:00:00 +00:00
Tim Potter
28ba237a9e Spelling fix. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
167f122b67 Winbind updates!
This updates the 'winbind' authentication module and winbind's 'PAM' (actually
netlogon) code to allow smbd to cache connections to the DC.

This is particulary relevent when we need mutex locks already - there is no
parallelism to be gained anyway.

The winbind code authenticates the user, and if successful, passes back the
'info3' struct describing the user.  smbd then interprets that in exactly the
same way as an 'ntdomain' logon.

Also, add parinoia to winbind about null termination.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Jim McDonough
31d7168530 Add LSA RPC 0x2E, lsa_query_info2. Only level implemented is 0x0c, which
is netbios and dns domain info.  Also add code to set/fetch the domain GUID
from secrets.tdb (although set is not yet called by anyone).
0001-01-01 00:00:00 +00:00
Gerald Carter
66104a3614 add another registry rpc (opnum 0x14). Have no idea what it's real name
is.  I'm calling it REG_SAVE_KEY, because 2k preps a regedt32.exe
Registry->Save Key with this call.

Done in the process of tracking down a PrinterDriverData issue.
0001-01-01 00:00:00 +00:00
Gerald Carter
0793612cca passing -1 for the src length in rpcstr_pull results in only
converting the first character of the unicode string.,  See convert_string()
for why.  uniarray_2_dosarray() passes 0 for the src length now which works.
0001-01-01 00:00:00 +00:00
Andrew Bartlett
f9bac7c5c2 A very long time ago (actually 6 months ago) I promised to commit this code
to the Samba tree.

Originally written by Nigel Williams" <nigel@veritas.com>, I've been
trying to keep it in some form of shape for the last 6 months.  In particular
I think some of the code got committed a few months ago, and others have made
changes to the CVS version over time.

anyway, its finally in - and doesn't appear to have broken anything.

Now to try the client-side patches :-)

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
5640e6cdb2 3 things:
* normalize all registry key strings before storing or looking
  up paths in the registry tdb
* return the current buffer size for REG_INFO even when not returning
  actual data
* fix a segfault report by metze on #samba-technical so that the
  user/group object picker works again (was the "ProductType" key
  lookup that was failing).
0001-01-01 00:00:00 +00:00
Gerald Carter
419d7208e8 several changes in this checkin
* added REG_OPEN_HKCR for supporting regedit.exe

* All data n a REGISTRY_VALUE is stored to a pointer now

* fixed REG_INFO to correctly display data when double clicking on
  and entry in the registry editor

* Will now enumerate installed driver_info_3 data

* fixed numerous bugs related to pointer offsets, memory issues, etc..
  in the registry routines

* added a simple caching mechanism to fetch_reg_[keys|values]_specific()

All that is left now is to enumerate PrinterData and I will have finished
what I started out to do....
0001-01-01 00:00:00 +00:00
Gerald Carter
998eb9c731 * changed structure of REG_R_ENUM_VALUE structure since the BUFFER2
is not and [in/out] buffer

* registry value enumeration is working now for the Print\Forms
  key.  The format of the binary data is not quite right yet
  but all installed forms are listed
0001-01-01 00:00:00 +00:00
Tim Potter
290a304d2c Name get and set dir drive functions consistently. 0001-01-01 00:00:00 +00:00
Andrew Bartlett
8196ee908e Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had a
distinction between uchar and char).

Lots of const etc.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Tridgell
8b769bf5bb more bug updates from head 0001-01-01 00:00:00 +00:00
Andrew Tridgell
04de6bbc80 fixed a number of real bugs found by warnings on the 64 bit irix compiler 0001-01-01 00:00:00 +00:00
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 0001-01-01 00:00:00 +00:00
Jeremy Allison
175d43980e The changes in make_sec_desc to make us match W2K broke the marshalling/unmarshalling of
security descriptors. We need to calculate the maximum offset and set the offset
back after reading/writing every field in the SEC_DESC.
This was *nasty* to find....
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
7207662504 all that is left to do is to actually perform the
file deletion now.  I have the file list.
One more commit should do it.
0001-01-01 00:00:00 +00:00
Gerald Carter
f57640720e 8-byte alignment needed for beginning driver_info_level_6.
Verified by looking at NT4 and 2k servers.  First time
for everything I guess.
0001-01-01 00:00:00 +00:00
Gerald Carter
b0f178f452 fixup ADDPRINTERDRIVEREX some more. unknown uint32 for now. 0001-01-01 00:00:00 +00:00
Gerald Carter
55fbfd02ba added parsing routines for SPOOLSS_ADDPRINTERDRIVEREX and
SPOOLSS_DELETEPRINTERDRIVEREX.  Ran them through some testing.
I know I'm off by 2 x uint32's in the former RPC.
0001-01-01 00:00:00 +00:00
Gerald Carter
d675974d0c * basic implementation of SPOOLSS_DELETEPRINTERDATAEX and
SPOOLSS_DELETEPRINTERKEY
* stub funnctions for SPOOLSS_ADDPRINTERDRIVEREX and
  SPOOLSS_DELETEPRINTERDRIVEREX
0001-01-01 00:00:00 +00:00
Gerald Carter
2a68e4529a fixed the geyed out registry keys. Stupid typo on my part.
Now on to plug in the printing tdbs to the registry view....

jerry
0001-01-01 00:00:00 +00:00
Andrew Bartlett
0c4afe075a More code from "Kai Krueger" <kai@kruegernetz.de>, this time starting to make
the 'user cannot change password' button work.  Needs help from a future SAM
backend, but at least this parses the data, and returns an error.

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Gerald Carter
542d3c93a9 first cut at implementing support for browsing printer and driver driver
via regedt32.exe.  The regsitry.tdb is only a framework.  It is not
intended to store values, only key/subkey structure.  The data
will be retrieved from nt*tdb (for printers) creating a virtual view
of the data.

You can currently connect to a Samba box using regedt32.exe (haven't
tried regedit.exe).  Some basic keys are created in registry.tdb
for use.

There are two problems....

  * something is getting freed in the winreg code that causes heap
    corruption later on.  As long as you don't play with the winreg
    server functionality, I don't think you'll be bitten by this.

  * no access controls are currently implemented

  * I can't browse HKLM because regedt32 greys out the SYSTEM subkey.

ok so that was three....
0001-01-01 00:00:00 +00:00
Andrew Bartlett
5a2a6f1ba3 Break up the passdb objects (to allow RPC clients to link without brining in
*.o) and implment new enum_dom_users code in the SAMR RPC subsystem.

Incresingly, we are using the pdb_get_{user,group}_sid() functions, in the
eventual hope that we might one day support muliple domains off a single
passdb.  To extract the RID, we use sid_peek_check_rid(), and supply an
'expected' domain SID.

The id21 -> SAM_ACCOUNT and id23 -> SAM_ACCOUNT code has been moved to
srv_samr_util.c, to ease linking in passdb users.

Compatiblity code that uses 'get_global_sam_sid()' for the 'expected' sid is in
pdb_compat.c

Andrew Bartlett
0001-01-01 00:00:00 +00:00
Andrew Tridgell
80c3c68de2 fixed our winreg parsing to handle a diifferent form given to us by
WinXP. This fixes setting security decsriptors from XP Professional.
0001-01-01 00:00:00 +00:00
Tim Potter
daf4c6a013 Merge of constant renames from APPLIANCE_HEAD. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
91ad9041e9 used findstatic.pl to make some variables static and remove some dead
code
0001-01-01 00:00:00 +00:00
Jeremy Allison
3603cd4947 Proper merge of all the working printing stuff from APPLIANCE_HEAD.
Now let's keep this in sync !
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
fc3770f281 a null grp_sid should have a 0 offset. Also removed a few more unnecessary
prs_align() for sec_desc.
0001-01-01 00:00:00 +00:00
Gerald Carter
d8cf54399d merge from APP_HEAD 0001-01-01 00:00:00 +00:00
Jeremy Allison
4ed134426d Typo...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
374182a9ba Added prs_align_uint16 for SD aligns.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
f471c880db sync with the sec_desc parsing fix from APP_HEAD. I will probably need
to revisit this some.
0001-01-01 00:00:00 +00:00
Gerald Carter
f753676286 printing merge from SAMBA_2_2. Ther server code looks to be in sync now.
Mostly formatting and s/free/SAFE_FREE/g changes with the two exceptions
being

  * John driver init changes
  * Tim's printer enumeration bug fix
0001-01-01 00:00:00 +00:00
Simo Sorce
897e64d2e0 more debug classess activated 0001-01-01 00:00:00 +00:00
Andrew Bartlett
a2c791c0bb Add a touch of const to this - helps with some yet-to-be-commited changes 0001-01-01 00:00:00 +00:00
Jeremy Allison
64af68924b Merge of Jerry's fix from 2.2.
Jeremy.
0001-01-01 00:00:00 +00:00
Jim McDonough
2b4a5b5666 Add user name to netsessenum RPC to stop 1783 messages. Also fix where username was sent as machine name. 0001-01-01 00:00:00 +00:00
Tim Potter
2e25b5c309 Fixed bogus alignment in unmarshalling of SAMR_GET_DOM_PWINFO reply. 0001-01-01 00:00:00 +00:00
Jim McDonough
4b18a94590 Add rpc for file close, expand file enum to take username 0001-01-01 00:00:00 +00:00
Jim McDonough
4e31716385 Add fns for netshareadd and netsharedel rpcs 0001-01-01 00:00:00 +00:00
Jim McDonough
b3fea72ee9 Update netfileenum on both client and server sides to do an arbitrary number
of files.  This was done to better enable net rpc file.  Perhaps we can start
giving back real info this way, too.
0001-01-01 00:00:00 +00:00
Jim McDonough
8fc3dba8bd netfileenum was missing the username filter. 0001-01-01 00:00:00 +00:00
Tim Potter
0c65978ed0 Added netremotetod to try and figure out which srvsvc commands are denied
when using restrictanonymous.
0001-01-01 00:00:00 +00:00
Tim Potter
c7214baa05 When marshalling a netshareenum request the share ctr has to be initialised
to an empty value instead of a null pointer otherwise the server service
crashes on NT.
0001-01-01 00:00:00 +00:00
Gerald Carter
83f109c940 merge from SAMBA_2_2.
Tim, please check the prs_align() removed from sec_io_desc()
and make sure it doesn't break anything else.  I know it is
right for the printing needs and I have tested some other
general things like viewing acls on directories, but I would
feel more comfortable if you would have a look as well.


jerry
0001-01-01 00:00:00 +00:00