1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

701 Commits

Author SHA1 Message Date
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...
-
Tim Potter
28ba237a9e Spelling fix. -
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
-
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).
-
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.
-
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.
-
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
-
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).
-
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....
-
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
-
Tim Potter
290a304d2c Name get and set dir drive functions consistently. -
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
-
Andrew Tridgell
04de6bbc80 fixed a number of real bugs found by warnings on the 64 bit irix compiler -
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.
-
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.
-
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.
-
Gerald Carter
b0f178f452 fixup ADDPRINTERDRIVEREX some more. unknown uint32 for now. -
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.
-
Gerald Carter
d675974d0c * basic implementation of SPOOLSS_DELETEPRINTERDATAEX and
SPOOLSS_DELETEPRINTERKEY
* stub funnctions for SPOOLSS_ADDPRINTERDRIVEREX and
  SPOOLSS_DELETEPRINTERDRIVEREX
-
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
-
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
-
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....
-
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
-
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.
-
Tim Potter
daf4c6a013 Merge of constant renames from APPLIANCE_HEAD. -
Andrew Tridgell
91ad9041e9 used findstatic.pl to make some variables static and remove some dead
code
-
Jeremy Allison
3603cd4947 Proper merge of all the working printing stuff from APPLIANCE_HEAD.
Now let's keep this in sync !
Jeremy.
-
Gerald Carter
fc3770f281 a null grp_sid should have a 0 offset. Also removed a few more unnecessary
prs_align() for sec_desc.
-
Gerald Carter
d8cf54399d merge from APP_HEAD -
Jeremy Allison
4ed134426d Typo...
Jeremy.
-
Jeremy Allison
374182a9ba Added prs_align_uint16 for SD aligns.
Jeremy.
-
Gerald Carter
f471c880db sync with the sec_desc parsing fix from APP_HEAD. I will probably need
to revisit this some.
-
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
-
Simo Sorce
897e64d2e0 more debug classess activated -
Andrew Bartlett
a2c791c0bb Add a touch of const to this - helps with some yet-to-be-commited changes -
Jeremy Allison
64af68924b Merge of Jerry's fix from 2.2.
Jeremy.
-
Jim McDonough
2b4a5b5666 Add user name to netsessenum RPC to stop 1783 messages. Also fix where username was sent as machine name. -
Tim Potter
2e25b5c309 Fixed bogus alignment in unmarshalling of SAMR_GET_DOM_PWINFO reply. -
Jim McDonough
4b18a94590 Add rpc for file close, expand file enum to take username -
Jim McDonough
4e31716385 Add fns for netshareadd and netsharedel rpcs -
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.
-
Jim McDonough
8fc3dba8bd netfileenum was missing the username filter. -
Tim Potter
0c65978ed0 Added netremotetod to try and figure out which srvsvc commands are denied
when using restrictanonymous.
-
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.
-
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
-
Tim Potter
bbad6c6678 OK that last commit was incorrect - this call is parsed properly. I only
imagined it wasn't!
-
Tim Potter
2429c4cc79 There's probably a pointer to a buffer at the end of a enumprinterdrivers()
rpc call which we currently don't parse - just added a comment about it for
the moment as not parsing it is harmless.
-
Tim Potter
1fb8e2b3a0 No need to pass a fstring in make_spoolss_q_enumprinters() -
Andrew Bartlett
c28668068b A few things in this commit:
cleanup some of the code in net_rpc_join re const warnings and
fstrings.

Passdb:

Make the %u and %U substituions in passdb work.
This is done by declaring these paramters to be 'const' and doing
the substitution manually.  I'm told this is us going full circle,
but I can't really see a better way.

Finally these things actually seem to work properly...

Make the lanman code use the pdb's recorded values for homedir etc
rather than the values from lp_*()

Add code to set the plaintext password in the passdb, where it can
decide how to store/set it.  For use with a future 'ldap password
change' option, or somthing like that...

Add pdb_unix, so as to remove the 'not in passdb' special cases from the
local_lookup_*() code.  Quite small, as it uses the new 'struct passwd ->
SAM_ACCOUNT' code that is now in just one place.  (also used by pdb_smbpasswd)

Other:
Fix up the adding of [homes] at session setup time to actually pass
the right string, that is the unix homedir, not the UNC path.

Fix up [homes] so that for winbind users is picks the correct name.
(bad interactions with the default domain code previously)

Change the rpc_server/srv_lsa_nt.c code to match NT when for the
SATUS_NONE_MAPPED reply:  This was only being triggered on
no queries, now it is on the 'no mappings' (ie all mappings failed).
Checked against Win2k.

Policy Question:  Should SID -> unix_user.234/unix_group.364 be
considered a mapping or not?  Currently it isn't.

Andrew Bartlett
-
Andrew Bartlett
e5b4331ffa Make non-static for some later work (pushing the info3 across the winbind
pipe for smbd to decode), and fix up the debug.  (At least I assume it is
wrong, can an expert care to comment?)
-