1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-19 12:23:49 +03:00
Commit Graph

990 Commits

Author SHA1 Message Date
Gerald Carter
db286e66ec addform fix from SAMBA_2_2 -
Gerald Carter
cd9ee27d89 segfault fixes merged from APP_HEAD -
Andrew Bartlett
d8122cee05 Based orginally by work by Kai, this patch moves our NT_TOKEN generation into
our authenticaion code - removing some of the duplication from the current
code.

This also gets us *much* closer to supporting a real SAM backend, becouse the
SAM can give us the right info then.

This also changes our service.c code, so that we do a VUID (rather than uid)
cache on the connection struct, and do full NT ACL/NT_TOKEN checks (or cached
equivilant) on every packet, for the same r or rw mode the whole share was open
for.

Andrew Bartlett
-
Gerald Carter
1ed6f68f6f add support for the "value,OID" format described in MSDN.
I've not seen this on a real network, but we support it now :-)
-
Gerald Carter
113d960d77 added wrapper for delete_printer_data() that write the printer out to disk. -
Gerald Carter
a413ff8b49 change notify fix left out of merge by APP_HEAD by accident -
Gerald Carter
b6ceb8c2e5 * Fix DeletePrinterDataEx() to work with arbitrary registry keys
* Fix delete_all_printer_data() to accept a key name for partial tree
  deletions

* Fix EnumPrinterKey() to work with subkeys

* Fix DeletePrinterKey() to work with ful or partial registry
  trees

* Fix get_printer_subkeys() to return a list of unique keynames
  ( some were getting added twice due to subkeys names )

* fix a couple of typos for good measure
-
Gerald Carter
32a7083843 fix to allow EnumPrinterKey() to enumerate multiple levels of subkeys.
Works on the top level.  Needs more testing for levels > 1.
-
Gerald Carter
e72184ce13 * small formatting fixes
* Fix EnumPrinterKey() to enumerate all printer keys
  ( this will break if we have more than one level deep of printer keys )
-
Gerald Carter
2d5e4cdc3a fixed up a few comments
removed now unused getprinterdata)printer() function
-
Gerald Carter
4eb8ffba03 * fix Get/SetPrinterDataEx() to work with printer key other
than SPOOL_PRINTERDATA_KEY

* created an internal set/get_printer_dataex() call for reuse in
  Set/GetPrinterData()
-
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
-
Gerald Carter
cdaa3f55e1 fix seg fault in _spoolss_enumprinterkey after changes...
add SPOOL_PNPDATA_KEY define
-
Tim Potter
8ebc295f4a Return access granted in create_user2. -
Gerald Carter
2feb89601f fix small bug in enumprinterdataex due to my changes (still more lurking
though).
-
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
-
Andrew Bartlett
bc9e9e3e2e Return the error if get_group_domain_entries() fails. -
Tim Potter
482d873c26 Rename unknown_0 field in create_user2 reply in the actual struct. -
Gerald Carter
11ddfd9cfa printing change notification merge from APPLIANCE_HEAD -
Tim Potter
fe43c2ac2d Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD. -
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...
-
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
26027ee42a couple of minor formatting fixes to help me see better. -
Gerald Carter
c268ae460e merge from SAMBA_2_2 -
Andrew Bartlett
e69b476626 Fix a missing 'no memory' return in last night's svrsvc code, and use
sys_dup2() in a couple more places.

Andrew Bartlett
-
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).
-
Andrew Bartlett
888d595fab Mimir has been busy with patches again, and sent in the following
patches:

Andrew Bartlett

From his e-mail:

Below I attach the following patches as a result of my work
on trusted domains support:
 1) srv_samr_nt.c.diff
    This fixes a bug which caused to return null string as
    the first entry of enumerated accounts list (no matter what
    entry, it was always null string and rid) and possibly
    spoiled further names, depeding on their length.
    I found that while testing my 'net rpc trustdom list'
    against nt servers and samba server.
 2) libsmb.diff
    Now, fallback to anonymous connection works correctly.
 3) smbpasswd.c.diff
    Just a little fix which actually allows one to create
    a trusting domain account using smbpasswd
 4) typos.diff
    As the name suggests, it's just a few typos fix :)
-
Gerald Carter
915ee5c0ec * fix return code so we don't let a client just open any key it wants
(even nonexistent ones).  This gets rid of the Scheduling Agent icon.

* fix NT_STATUS return code for bad registry path (NT_STATUS_NO_SUCH_FILE)
-
Gerald Carter
2a30c243ec done! printer_info_2, devicemode, sec_desc, & printer data all enumerate
and display correctly in regedit.exe.

Not sure about REG_SZ values in PrinterDriverData.  If we store these
in UNICODE, I'll have to fix up a few things.

REG_BINARY & REG_DWORD are fine.
-
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....
-
Andrew Tridgell
44e92b6523 implemented getgrouplist() for systems that don't have it and use it
in get_alias_user_groups(). The old method used getgrent() which is
extremely slow when the number of groups is large
-
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
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 -