1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

956 Commits

Author SHA1 Message Date
Tim Potter
11229aa88b Sync with APPLIANCE_HEAD branch (whitespace, const only) -
Tim Potter
825cdc49db Merge from APPLIANCE_HEAD. -
Tim Potter
290a304d2c Name get and set dir drive functions consistently. -
Andrew Bartlett
88b68f7972 More use of intermediate variables to avoid issues with pointer size and casts.
Andrew Bartlett
-
Gerald Carter
e62ae94823 another intermediate checkin on the way to enumerating forms
via the registry.  There is a seg fault here which shouldn't
bother anyone until I can get it fixed.  I just need
a check point in case I need to roll back to this version later on.
-
Andrew Bartlett
30d0998c8c More fixes towards warnings on the IRIX compiler
(and yes, some of these are real bugs)

In particular, the samr code was doing an &foo of various types, to a function
that assumed uint32.  If time_t isn't 32 bits long, that broke.

They are assignment compatible however, so use that and an intermediate
variable.

Andrew Bartlett
-
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
-
Gerald Carter
c5768538f6 enumeration of printers keys ( no data yet ) via the registry
functions now works :-)
-
Gerald Carter
e7b55e8f01 * refactored registry operations some. subkey lists and
registry values are now passed around in containers
  (REGSUBKEY_CTR & REGVAL_CTR) which each possess a TALLOC_CTX.

* removed subkey_specific_fn() from REGISTRY_OPS.  Is implemented
  in the form of a wrapper

* temporarily broke the printing registry ops.

* implemented inheritence for the data_p of nodes in a SORTED_TREE

* All REGISTRY_KEY instances now store a valid REGISTRY_HOOK since
  the default REGOSTRY_OPS structure is stored in the root of the
  cache_tree.

* Probably some other change I forgot....  T
-
Gerald Carter
a43d9788fa virtual registry framework with initial printing hooks. -
Jeremy Allison
4ff64f6970 Gone back to explicit queue number passing as snum - removed encoding of
queueid in job number. This means we must have an internal tdb to store
mapping from 16 bit RAP jobid's to 32 bit RPC jobids.
Jeremy.
-
Gerald Carter
9772acd9ad splitting off storage/retrieval routines for abstracting the
registry view front end.  Now to plug in the various hooks.
-
Andrew Tridgell
04de6bbc80 fixed a number of real bugs found by warnings on the 64 bit irix compiler -
Andrew Tridgell
cfc5ca3416 fixed a problem with getgroups() where it could include our current
effective gid which could mean that the user gets group 0 in their
group list for acl interpretation

this is a replacement fix for the one richard did in 2.2 (which didn't
cope wiith variable behaviour depending on which nss module was in
use)
-
Jeremy Allison
d3c73e5970 We must ZERO_STRUCT before using the buffer in copy_unistr2.
Fixes addprinterdriverex.
Jeremy.
-
Gerald Carter
dcb6d70706 added copyright -
Gerald Carter
17bb780e13 last check in for tonight.
* DeletePrinterDriverEx() now has the ability to delete
    driver files.  I need to do some more testing
    tro veriofy that we are in fact not deleting a file out from
    under another driver, but it looks ok so far.

  * DeletePrinterDriver() noiw deletes all versions of the
    specified driver (cversion == 0, 1, 2, 3)
-
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
3fa6c31329 intermediate work on DeletePrinterDriverEx(). This call
will actually delete driver files ( not yet though I don't think).
Just wanted to get it in since Jeremy and I are both
working on nt_printing.c
-
Gerald Carter
be926c3a1a fix typo -
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
-
Andrew Bartlett
1de04ec473 Kill off const warnings - add a pile of const to various places. -
Andrew Bartlett
7ac6517bec Jerry: Sorry if I am stepping on toes here, but this should fix the compile on
solaris CC (void* arithmatic) and fixes the other warnings (global variable
shadows) that gcc has with this file.

Andrew Bartlett
-
Andrew Bartlett
c20d057f88 Updates to the 'name -> sid' code:
Correct the 'none mapped' behaviour, (so that it matches Win2k) and  add a
function to make the SID types appear as text strings in logs/rpcclient.

Also, remove a silly case that would cause 'failure' to be 'success'.  (Might
look at this a bit more in future).

Andrew Bartlett
-
Andrew Bartlett
685a205445 Copy the NT_TOKEN to the pipe, so the SAMR can use it for access control.
Andrew Bartlett
-
Tim Potter
180374c444 Remove C++ comments. -
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
3b934e6a85 * fix seg fault caused by missing DLIST_REMOVE in free_fn()
* fixed constant vaolued returned by REG_UNKNOWN_1A
-
Andrew Bartlett
43b7249370 Patch to add security descriptors to the SAMR pipe.
This is not the final solution, I think this will probably changed with the
move to the new SAM subsystem, but it allows some research and gives us
somthing to start with.

It should also help with getting proper NT_TOKEN passing set-up.

Original patch by "Kai Krueger" <kai@kruegernetz.de>, which I have modified to
pass back NTSTATUS returns in more places and to use a little more common code.

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
-
Jeremy Allison
17cae0d683 Address the string_sub problem by changing len = 0 to mean "no expand".
Went through and checked all string_subs I could to ensure they're being
used correctly.
Jeremy.
-
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
b35fc30c37 Added limit on SPOOLSS pipes from 2.2.x
Jeremy.
-
Jeremy Allison
3603cd4947 Proper merge of all the working printing stuff from APPLIANCE_HEAD.
Now let's keep this in sync !
Jeremy.
-
Andrew Bartlett
c98b9a9659 I'm going to try and check this against Win2k shortly, but I'm certain that
'NT_STATUS_OK' is not the right answer here.  Try NO_MORE_ENTRIES for now.

Andrew Bartlett
-
Gerald Carter
b07d6d4ceb compile fix -
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
4c0cbcaed9 Rework much of the service.c code:
The aim of this execise is to give the 'security>=user' code a straight paper
path.  Security=share will sill call authorise_login(), but otherwise we avoid
that mess.

This allow *much* more accurate error code reporting, beocuse we don't start
pretending that we can use the (nonexistant) password etc.

Also in this patch is code to create the 'homes' share at session setup time
(as we have done in the past - been broken recently) and to record this on
the user's vuser struct for later reference.  The changes here should also
allow for much better use of %H (some more changes to come here).

The service.c changes move a lot of code around, but are not as drastric
as they look...

(Also included is a fix to srv_srvsvc_nt.c where 'total_entries' not
'*total_entries' was compared).

This code is needs testing, but passes my basic tests.

I expect we have lost some functionality, but the stuff I had expected
to loose was already broken before I started.  In particular, we don't 'fall
back' to guest if the user cannot access a share (for security=user).  If you
want this kind of stuff then you really want security=share anyway.

Andrew Bartlett
-
Andrew Bartlett
6872de2e5b Update the netlogon code to better cope with trusted domains, where things
like the domain name and SID come from the remote domain, not the local
one.  These are filled out by the code from the previous commit (auth_util.c,
the make_server_info_info3() fn) and read back here.

Andrew Bartlett
-
Andrew Bartlett
29490f2147 Add const, kill of useless casts and therefore eliminate warnings.
Andrew Bartlett
-
Andrew Bartlett
04f9a8ff4c Latest patch from metze <metze@metzemix.de> to move most of samba across
to using SIDs instead of RIDs.

The new funciton sid_peek_check_rid() takes an 'expected domain sid' argument.

The idea here is to prevent mistakes where the SID is implict, but isn't
the same one that we have in the struct.

Andrew Bartlett
-
Gerald Carter
30a0e72572 merge from 2.2 -
Andrew Bartlett
1d6ba40558 This (hopefully) fixes a bug reported by Kai Krueger <kai@kruegernetz.de>
involving the use of lp_winbind_gid() without checking if they have been
set.

Also revert the 'clashing user' check back to a Get_Pwnam() - I probably should
never have changed it.

Andrew Bartlett
-
Andrew Bartlett
96afea638e Globally replace 'global_sam_sid' with get_global_sam_sid(), a self
initialising function.  This patch thanks to the work of
"Stefan (metze) Metzmacher" <metze@metzemix.de>

This is partly to enable the transition to SIDs in the the passdb.

Andrew Bartlett
-
Tim Potter
e80e663706 Fix compile error - doh! -