1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00
Commit Graph

282 Commits

Author SHA1 Message Date
Jeremy Allison
c25533de99 Fixed bug found by Gerald. If a Samba server joins a domain and is set
to search for a DC to authenticate to using the "*" syntax than ensure
that for the first hour after the password change is searches for the
PDC using the 1B name not the 1C name as domain replication may not
have occured.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
506b5e34c3 Added lock backouts on fail.
When chaining together long lines of bloody "if" statements, which should
logically be separated, and one of them allocates memory, remember to
*free* it *WHETHER OR NOT THE IF STATEMENTS SUCCEEDED* !!!!
Yes I do consider this a bug in the coding style of Tridge, Rusty, Tim et al. :-).
I'm just pissed 'cos this took 4 hours to track down even with an insure error report
stating me in the face and also Ben Woodward looking over the code with me :-).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
0a40bc83e1 Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. Merged
in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open
problem.
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
1db0f31ae0 Wrong length for unistr2 in init_q_lookup_names()
Removed some more static arrays and replaced with tallocated memory
blocks.
0001-01-01 00:00:00 +00:00
Tim Potter
fa604bc85e Fixed some accidentally reversed patches. 0001-01-01 00:00:00 +00:00
Jeremy Allison
9e9c71c8b3 Merged in Tim's changes : Removed static limit of MAX_LOOKUP_SIDS in rpc server and client
lsa_lookup_names() and lsa_lookup_sids().
Jeremy.
0001-01-01 00:00:00 +00:00
Tim Potter
4c8ce7af46 Removed a dead function. 0001-01-01 00:00:00 +00:00
Tim Potter
817819d0cc Port of lsa_lookup_sids() and lsa_lookup_names() rpc client functions from
TNG branch.

Re-instated lsa_lookup_sids and lsa_lookup_names functions in rpcclient.

This requires most samba binaries to link in another handful of object
files due to uncessary coupling between modules.  )-:
0001-01-01 00:00:00 +00:00
Andrew Tridgell
c9e4dea1cb fixed a typo 0001-01-01 00:00:00 +00:00
Andrew Tridgell
a2d07994e0 pass the desired access into cli_nt_create() 0001-01-01 00:00:00 +00:00
Andrew Tridgell
9ec4b1fa48 no longer pass the type to make_sec_desc(), instead the type is
derived from the other arguments
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
b655bc281f added samr_set_user_info and info_2.
cleanup of create_user
cleanup of rid/sid mix in samr. now we only have sid.

some prs_align() missing in parse_samr.c

a small debug change in srv_pipe.c

You still can't change a user's password in this commit.
Will be availble in the next one.

	J.F.
0001-01-01 00:00:00 +00:00
Jeremy Allison
dfe77c7046 Herb's warning fixes. Also the POSIX locking fix.
We now use our own vfs layer to do get/set acl calls (hurrah!).
Jeremy.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
4c63c91858 printer notify code.
It only sends notifies to one client. The broadcasting notify code will
code soon.

	J.F.
0001-01-01 00:00:00 +00:00
Gerald Carter
ae7dd77c24 spoolgetprinterdriver now returns "Windows NT x86" and "Windows 4.0"
driver information.

Will merge into TNG.



jerry
0001-01-01 00:00:00 +00:00
Tim Potter
2d23607bb0 Removed compiler warning. 0001-01-01 00:00:00 +00:00
Gerald Carter
facef51be4 changing some debug message levels
j-
0001-01-01 00:00:00 +00:00
Gerald Carter
95355d2cf2 minor formatting fixes.
jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
ce2d20395a FIxed some unmarshalling problems with relstr and unistr arrays
jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
4bc5b8aa34 code formatting cleanup
jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
880e811616 Needed to add the SHARED attribute bit when creating a printer
on a Samba host.  Also needed to add an option to pass the share
name (printer name) on the command line.

And fixed the checking of the return code for spoolss_r_addprinterex()




jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
8ecd5dd52a More work on AddPrinterDriver() and AddPrinterEx() client RPC's
Also fixed init_unistr() to deal with a NULL source character string.



-jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
3bf9a29f34 All changes related to rpcclient...
- cleaned up some code
- Fixed a few memory leaks of my own making
- Add AddPrinterDriver(); I'm missing some of the semantics
  here as the call is done correctly, but I'm not getting all
  the information right in the DRIVER_INFO_3 struct I think.
  Will work on it tomorrow some more...



--jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
8e5e929561 spoolss_addprinterex() was adding the printer and returning the
correct handle, but was deleting the connection to the server.
Doh!!



--jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
e15d9befd2 clunky support for calling AddPrinterEx(). The code currently reports
that the call failed, but the printer shows up on the remote NT client.
(note this is the client side call).  I've botched the return value
somewhere and will fix that today.




jerry
0001-01-01 00:00:00 +00:00
Jeremy Allison
c55bcec817 Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need NT_STATUS_XXX).
Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more
obscure way.
Jeremy.
0001-01-01 00:00:00 +00:00
Gerald Carter
45fbf31b69 More work on rpcclient...
* Fixed to work with Jeremy's recent changes re: dunamic
    memory allocation when unmarshalling unistr[2]
  * included EnumPorts level 1
  * more work on AddPrinterEx




--jerry
0001-01-01 00:00:00 +00:00
Jeremy Allison
0ff2ce543e Ok - this is a *BIG* change - but it fixes the problems with static strings
in the RPC code. This change was prompted by trying to save a long (>256)
character comment in the printer properties page.

The new system associates a TALLOC_CTX with the pipe struct, and frees
the pool on return of a complete PDU.

A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx
code, and is freed in the main loop.

This code works with insure, and seems to be free of memory leaks and
crashes (so far) but there are probably the occasional problem with
code that uses UNISTRxx structs on the stack and expects them to contain
storage without doing a init_unistrXX().

This means that rpcclient will probably be horribly broken.
A TALLOC_CTX also needed associating with the struct cli_state also,
to make the prs_xx code there work.

The main interface change is the addition of a TALLOC_CTX to the
prs_init calls - used for dynamic allocation in the prs_XXX calls.

Now this is in place it should make dynamic allocation of all RPC
memory on unmarshall *much* easier to fix.

Jeremy.
0001-01-01 00:00:00 +00:00
Jean-François Micouleau
883f7402d4 Found out that we are crashing spoolss in enumprinterdata.
So fixed enumprinterdatas in rpcclient to debug the server code,
and found that the parsing code was missing 2 prs_align().

We are not crashing NT anymore. :-)

        J.F.
0001-01-01 00:00:00 +00:00
Tim Potter
7145689bf5 Fixed memory leak in modify_trust_password() 0001-01-01 00:00:00 +00:00
Gerald Carter
2c0f6bcc8f some initial code for AddPrinterEx() project. Most is ifdef'd out
'cause it's not all written.


-jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
a9522f560d * Added EnumPorts()
* Fixed an off-by-one bug noticed by JF in GetPrinterDriverDirectory()



jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
c8abc31187 Fixed unitilized secdesc pointer which was causing spoolgetprinter
rpcclient command to fail on shared printers.




jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
84349394a9 Fixed some more client SPOOLSS functions. The following
functions work now:

  - spoolenum
  - spoolopen
  - spoolgetprinter
  - spoolgetprinterdriver

Items todo:

  - track down memory bug with spoolenumdata
  - fix spoolgetprinterdriverdir
  - fix spoolgetdata
  - fix display_job_info_ctr in spooljobs

All part of the rpcclient work.

Jeremy, this check includes emthods for associating
POLICY_HNDs and client states.  See the RpcHndList_...()
function calls (implemented in lib/util_list.c)



--jerry
0001-01-01 00:00:00 +00:00
Tim Potter
dea06ad7a5 Reverted changes from rpcclient merge - contains memory leak! 0001-01-01 00:00:00 +00:00
Gerald Carter
f850935617 Lots of changes but no real progress in functionality.
more changes to remove the ncarpc_l_* stuff.

Fixed some cut and paste errors from TNG

There are very subtle bugs in this code.  I'll work on simplifying
them in round two or three.



--jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
233b074f49 More functions merged from TNG for rpcclient. They don't all work
currently as I have to do something about the policy handle caching
issues.



--jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
3d00e969df cleaned up access to prs_struct variables. Replaced all calls
prs_free_data() => prs_mem_free
	prs_realloc_data => prs_grow


--jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
549d1d2621 removed references to loopback RPC connections.
added a few more kfunctions from TNG for rpcclient



--jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
588aadb29f spoolenum commend (when compiled with the new prs_unistr())
now works.   :-)




jerry
0001-01-01 00:00:00 +00:00
Tim Potter
3ee111bff7 Fix for passing NULL pointer as an array parameter in
domain_client_validate()
0001-01-01 00:00:00 +00:00
Gerald Carter
61d2aad5dc More rpcclient merge issues:
* fixes some readline bugs from the merge
        * first attempt at commands (spoolenum almost works)
        * no changes to existing functions in HEAD; only additions
          of new functions.  I'll weed out what I can as I go.




--jerry
0001-01-01 00:00:00 +00:00
Gerald Carter
269051aa0c first pass at merging rpcclient from TNG to HEAD. You can get a
semi-connection and a rpcclient prompt, but no functionality there yet.
Will be a few more days on that.

--jerry
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f890bcf067 moved secrets fns into secrets.c 0001-01-01 00:00:00 +00:00
Jeremy Allison
f0a7540831 rpc_client/cli_lsarpc.c: Removed unused variable.
rpc_server/srv_spoolss_nt.c: Fixed more memory leaks.
smbd/nttrans.c: Fixed shadow variable problem.
Jeremy.
0001-01-01 00:00:00 +00:00
Matthew Chapman
7710b4f48d Fixed LsaQueryInformationPolicy level 3 to return primary domain info.
Domain SID is saved in secrets.tdb upon joining domain.

Added "Authenticated Users" and "SYSTEM" well-known SIDs (under
NT Authority).
0001-01-01 00:00:00 +00:00
Shirish Kalele
15e7d8f6c5 Added the NETDFS pipe to allow remote administration of the msdfs symlinks
on the samba server.
0001-01-01 00:00:00 +00:00
Jeremy Allison
87c4d46abe Cutover from 2.2.x - missed in merge.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f76c037255 the beginnings of a new scheme I've working on to allow an easier
head/tng merge.

It goes something like this:

- headers from tng get copied over one at a time

- the old headers get renamed to *_old.h

- server side code that used the old headers gets a
  #define OLD_NTDOMAIN 1
  #undef OLD_NTDOMAIN
  at the start and end of the code

- mkproto.awk recognises these special defines and does magic stuff so
  that each .c file sees the right headers

- we start moving the rpc client libraries from tng to head.

if this goes OK then, in theory, we should be able to move the client
side rpc code from tng to head without disturbing the existing head
server side code. Then when that works we can consider merging the
server side.

it remains to be seen if this scheme will work. So far I've moved
rpc_samr.h and don't seem to have broken anything.

Note this this is still a very delicate operation, as at every step of
the way I want to keep head fully functional. Please don't take part
unless you discuss it with me first.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
88ad00b82a added secrets.tdb and changed storage of trust account password to use
it
0001-01-01 00:00:00 +00:00