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

2181 Commits

Author SHA1 Message Date
cvs2svn Import User
592dd24957 This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 6938b5b98a) 2002-08-17 07:09:23 +00:00
Gerald Carter
f56e06476f fix seg fault in _spoolss_enumprinterkey after changes...
add SPOOL_PNPDATA_KEY define
(This used to be commit cdaa3f55e1)
2002-08-17 00:38:20 +00:00
Gerald Carter
4ed429481c 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
(This used to be commit 7ba7c04c0e)
2002-08-16 15:36:37 +00:00
Tim Potter
ef4ff1bc48 Rename unknown_0 field in create_user2 reply in the actual struct.
Remove 9th place leading zero from some constants.
(This used to be commit 876e7b2bf4)
2002-08-15 19:37:34 +00:00
Gerald Carter
14d385439d printing change notification merge from APPLIANCE_HEAD
(This used to be commit 11ddfd9cfa)
2002-08-08 20:54:37 +00:00
Andrew Bartlett
7a0af712b0 Add 'const' to the function prototypes to match the recent commit.
(This used to be commit 0118e459b6)
2002-08-07 07:46:01 +00:00
Jim McDonough
6cfff280d8 Add AD version of samlogon replies for getdc. ATM it will only function
if you have an ADS DC.
(This used to be commit 059a352ebb)
2002-08-06 18:16:28 +00:00
Jim McDonough
5e42dcfe46 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...
(This used to be commit 2663446349)
2002-08-06 18:02:56 +00:00
Andrew Tridgell
ab9ff0fa73 This fixes a number of ADS problems, particularly with netbiosless
setups.

- split up the ads structure into logical pieces. This makes it much
  easier to keep things like the authentication realm and the server
  realm separate (they can be different).

- allow ads callers to specify that no sasl bind should be performed
(used by "net ads info" for example)

- fix an error with handing ADS_ERROR_SYSTEM() when errno is 0

- completely rewrote the code for finding the LDAP server. Now try DNS
  methods first, and try all DNS servers returned from the SRV DNS
  query, sorted by closeness to our interfaces (using the same sort code
  as we use in replies from WINS servers). This allows us to cope with
  ADS DCs that are down, and ensures we don't pick one that is on the
  other side of the country unless absolutely necessary.

- recognise dnsRecords as binary when displaying them

- cope with the realm not being configured in smb.conf (work it out
  from the LDAP server)

- look at the trustDirection when looking up trusted domains and don't
  include trusts that trust our domains but we don't trust
  theirs.

- use LDAP to query the alternate (netbios) name for a realm, and make
  sure that both and long and short forms of the name are accepted by
  winbindd. Use the short form by default for listing users/groups.

- rescan the list of trusted domains every 5 minutes in case new trust
  relationships are added while winbindd is running

- include transient trust relationships (ie. C trusts B, B trusts A,
  so C trusts A) in winbindd.

- don't do a gratuituous node status lookup when finding an ADS DC (we
  don't need it and it could fail)

- remove unused sid_to_distinguished_name function

- make sure we find the allternate name of our primary domain when
  operating with a netbiosless ADS DC (using LDAP to do the lookup)

- fixed the rpc trusted domain enumeration to support up to approx
  2000 trusted domains (the old limit was 3)

- use the IP for the remote_machine (%m) macro when the client doesn't
  supply us with a name via a netbios session request (eg. port 445)

- if the client uses SPNEGO then use the machine name from the SPNEGO
  auth packet for remote_machine (%m) macro

- add new 'net ads workgroup' command to find the netbios workgroup
  name for a realm
(This used to be commit e358d7b24c)
2002-08-05 02:47:46 +00:00
Andrew Tridgell
4516a14dbb added support for smbd listening on port 445 and 139. It now listens
on both by default, and you can specify a list of ports to listen on
either with "smb ports = " in smb.conf or using the -p option to smbd.

this is needed for proper netbiosless operation.
(This used to be commit 5dee0a7b5e)
2002-07-31 04:56:16 +00:00
Jim McDonough
89d46eeb33 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).
(This used to be commit 31d7168530)
2002-07-30 17:23:07 +00:00
Andrew Tridgell
55c978d85e net ads info now reports the IP of the LDAP server as well as its name - very useful in scripts
(This used to be commit fc0d5479b5)
2002-07-30 15:34:10 +00:00
Simo Sorce
edb9158f09 OK!
Finally the cascaded VFS patch is in.
Testing is very welcome, specially with layered multiple vfs modules.
A big thank to Alexander Bokovoy for his work and patience :)

Simo.
(This used to be commit 56283601af)
2002-07-30 09:59:53 +00:00
Gerald Carter
c17dc6c55c 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.
(This used to be commit 66104a3614)
2002-07-29 19:45:15 +00:00
Andrew Tridgell
1ea873e0a0 an initial fix for handling sparse files in smbd
This gets my test code working, where we previously failed with files
above 20G in size.

I'm still not completely happy with this. There are just too many
fields in trans2.c that we don't fill in.
(This used to be commit 7dfdb456d4)
2002-07-29 11:14:05 +00:00
Tim Potter
c47d973ff2 Added extern for popt_common_debug.
(This used to be commit 4c664a0de8)
2002-07-29 09:28:16 +00:00
Andrew Bartlett
e39b6dbff3 Another item off my long-term todo list:
Remove the n^2 search for valid 'tty' names from the sesion code when we
don't actually need it.  Its main value is in getting 'well behaved'
numbers for use with utmp, so when we are not doing utmp we don't need
this to get in the way.

Andrew Bartlett
(This used to be commit 50507e131d)
2002-07-28 02:23:22 +00:00
Andrew Bartlett
7ce66f79ea 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
(This used to be commit f9bac7c5c2)
2002-07-27 11:48:55 +00:00
Simo Sorce
2ff0939301 as per user request added windbind start/stop/restart in swat
almost working, seem it does not yet properly detect if windbind is running or not in all situations testing is welcome.
(This used to be commit e0988e9186)
2002-07-27 01:37:33 +00:00
Andrew Tridgell
45e71ce21b I had forgotten to commit this after running configure
(This used to be commit e3c2ef0a04)
2002-07-25 15:43:06 +00:00
Gerald Carter
a12ed7f506 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.
(This used to be commit 2a30c243ec)
2002-07-24 08:58:03 +00:00
Gerald Carter
c808cc3643 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....
(This used to be commit 419d7208e8)
2002-07-24 06:42:09 +00:00
Gerald Carter
e8177d1104 * 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
(This used to be commit 998eb9c731)
2002-07-23 04:55:06 +00:00
Andrew Tridgell
445a52ebb0 reran configure
(This used to be commit 54c7ad47e1)
2002-07-23 03:40:40 +00:00
Gerald Carter
9fe3bd1259 * 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
(This used to be commit e7b55e8f01)
2002-07-19 18:49:44 +00:00
Jeremy Allison
958b0e3528 Prevent gcc warning about shadowed global "index".
Jeremy
(This used to be commit ae92449375)
2002-07-18 23:26:34 +00:00
Gerald Carter
06ae9ac5d9 virtual registry framework with initial printing hooks.
(This used to be commit a43d9788fa)
2002-07-18 23:00:24 +00:00
Jeremy Allison
34ed527b13 print_jobid in the fsp struct should be uint32.
Jeremy.
(This used to be commit 51c8338c7a)
2002-07-16 21:51:56 +00:00
Gerald Carter
78750803d0 splitting off storage/retrieval routines for abstracting the
registry view front end.  Now to plug in the various hooks.
(This used to be commit 9772acd9ad)
2002-07-15 22:27:07 +00:00
Samba Release Account
f8db530339 preparing for release of 3.0-alpha18
(This used to be commit 9556d3316c)
2002-07-15 15:14:01 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Andrew Tridgell
3fbf057d78 removed some meaningless const casts that were causing thousands of
warnings (literally!) for the irix compiler
(This used to be commit 35b6b46bc6)
2002-07-14 04:11:21 +00:00
Richard Sharpe
3faee01c7c Some fix ups but committing so Andrew can look at the problem I have.
(This used to be commit 146ba3eb49)
2002-07-13 07:18:43 +00:00
Richard Sharpe
92c597a9b0 Fix up the include file that had problems as well.
(This used to be commit 753df0b897)
2002-07-13 05:43:34 +00:00
Gerald Carter
fca23fab8a added copyright
(This used to be commit 0bb3d0f1ca)
2002-07-11 13:27:32 +00:00
Gerald Carter
496e85dd81 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
(This used to be commit 3fa6c31329)
2002-07-11 01:54:26 +00:00
Jeremy Allison
b60bb290e0 Up the printing tdb version number to 5 as I've changed it.
Jeremy.
(This used to be commit f4eff4a99e)
2002-07-11 01:00:45 +00:00
Gerald Carter
51eeaa494c 8-byte alignment needed for beginning driver_info_level_6.
Verified by looking at NT4 and 2k servers.  First time
for everything I guess.
(This used to be commit f57640720e)
2002-07-09 23:23:19 +00:00
Gerald Carter
f7ed521501 fixup ADDPRINTERDRIVEREX some more. unknown uint32 for now.
(This used to be commit b0f178f452)
2002-07-08 22:01:51 +00:00
Gerald Carter
e247cb8239 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.
(This used to be commit 55fbfd02ba)
2002-07-08 20:15:47 +00:00
Gerald Carter
100b8986ea * basic implementation of SPOOLSS_DELETEPRINTERDATAEX and
SPOOLSS_DELETEPRINTERKEY
* stub funnctions for SPOOLSS_ADDPRINTERDRIVEREX and
  SPOOLSS_DELETEPRINTERDRIVEREX
(This used to be commit d675974d0c)
2002-07-08 18:34:55 +00:00
Andrew Bartlett
8dc39c1112 (this should have been part of the previous commit)
Add a function to display 'sid types' as strings - makes rpcclient outptut
and DEBUG() logs much eaiser to understand.

Move the enum for SID types to smb.h, becouse is really isn't LSA specific any
more.

Andrew Bartlett
(This used to be commit fc97398611)
2002-07-08 00:40:57 +00:00
Tim Potter
b1aec128e4 Remove C++ comments.
(This used to be commit 180374c444)
2002-07-05 04:08:32 +00:00
Andrew Bartlett
e48b3fe83c 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
(This used to be commit 0c4afe075a)
2002-07-04 13:11:54 +00:00
Andrew Bartlett
cd383bdc30 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
(This used to be commit 43b7249370)
2002-07-04 08:45:45 +00:00
Gerald Carter
a3c3960edc 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....
(This used to be commit 542d3c93a9)
2002-07-03 19:15:26 +00:00
Andrew Bartlett
0df1e25542 Kill off codepage related stuff, now we don't use codepages any more.
Andrew Bartlett
(This used to be commit d1ca2b9f23)
2002-07-03 00:44:39 +00:00
Tim Potter
5106ead0e0 Merge of constant renames from APPLIANCE_HEAD.
(This used to be commit daf4c6a013)
2002-07-02 04:07:32 +00:00
Andrew Tridgell
9930b0b065 used findstatic.pl to make some variables static and remove some dead
code
(This used to be commit 91ad9041e9)
2002-07-01 09:12:41 +00:00
Jeremy Allison
04f1c60c0a STRING was being redefined...
Jeremy.
(This used to be commit f631f7e0fc)
2002-06-28 18:17:11 +00:00