1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-17 02:05:21 +03:00

282 Commits

Author SHA1 Message Date
Jeremy Allison
7bf9d8ce4b 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.
(This used to be commit c25533de9918ed9b0c79fd039e11d1b79f513db0)
2000-12-19 23:57:48 +00:00
Jeremy Allison
99c2693c62 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.
(This used to be commit 506b5e34c3ba16768dbc82ba21044787de160c45)
2000-12-15 21:29:06 +00:00
Jeremy Allison
369f5fd1d7 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.
(This used to be commit 0a40bc83e14c69a09948ec09bb6fc5026c4f4c14)
2000-12-15 01:02:11 +00:00
Tim Potter
e43671cd57 Wrong length for unistr2 in init_q_lookup_names()
Removed some more static arrays and replaced with tallocated memory
blocks.
(This used to be commit 1db0f31ae00bf9c91eb7d02c96bf766d04c7bdef)
2000-12-13 11:53:37 +00:00
Tim Potter
b9c9e5d145 Fixed some accidentally reversed patches.
(This used to be commit fa604bc85ea6989c794747f668be8a4e62527b79)
2000-12-12 05:58:34 +00:00
Jeremy Allison
20ac3fc77e 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.
(This used to be commit 9e9c71c8b3194b7cd02fea0b6a000d4f2940d905)
2000-12-12 02:45:11 +00:00
Tim Potter
e15921110a Removed a dead function.
(This used to be commit 4c8ce7af4625bd2a47006fa4b3cf9cb40d62841a)
2000-12-08 03:57:50 +00:00
Tim Potter
3478427f2e 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.  )-:
(This used to be commit 817819d0cc3ecf642be5a1656be3b71bed260ee4)
2000-12-08 03:34:00 +00:00
Andrew Tridgell
d7a502f5a8 fixed a typo
(This used to be commit c9e4dea1cbcf6aa748f5cb10f226345dd2f1adbf)
2000-12-04 07:39:22 +00:00
Andrew Tridgell
d931013008 pass the desired access into cli_nt_create()
(This used to be commit a2d07994e0376a8d530d262573c96710bdff2236)
2000-12-04 07:26:56 +00:00
Andrew Tridgell
0e494d7ec6 no longer pass the type to make_sec_desc(), instead the type is
derived from the other arguments
(This used to be commit 9ec4b1fa48fbae937fdf78db06005a7b0cd52d89)
2000-12-04 01:58:22 +00:00
Jean-François Micouleau
75c346e70c 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.
(This used to be commit b655bc281fa183b1827a946ada1fcf500fb93aea)
2000-10-07 15:56:36 +00:00
Jeremy Allison
ba00796e6d Herb's warning fixes. Also the POSIX locking fix.
We now use our own vfs layer to do get/set acl calls (hurrah!).
Jeremy.
(This used to be commit dfe77c7046cbd65ee52aea7439f21503c1eac41d)
2000-10-06 18:13:52 +00:00
Jean-François Micouleau
233bc00020 printer notify code.
It only sends notifies to one client. The broadcasting notify code will
code soon.

	J.F.
(This used to be commit 4c63c9185887c64e57d901e82a4a16a83522c898)
2000-09-25 21:05:18 +00:00
Gerald Carter
072d39165d spoolgetprinterdriver now returns "Windows NT x86" and "Windows 4.0"
driver information.

Will merge into TNG.



jerry
(This used to be commit ae7dd77c2495d5e17f6e8da94afbe8cab3e773bb)
2000-09-12 16:03:16 +00:00
Tim Potter
bd5e70ebfd Removed compiler warning.
(This used to be commit 2d23607bb0fe3d93809b3a194f9976b01ece8768)
2000-08-31 04:27:38 +00:00
Gerald Carter
7c3ca833e6 changing some debug message levels
j-
(This used to be commit facef51be4e3f3be75613f39c8dfedfa7410552c)
2000-08-18 05:55:37 +00:00
Gerald Carter
a19339b3ac minor formatting fixes.
jerry
(This used to be commit 95355d2cf26f51b1f928b8a020a4a731483be0b8)
2000-08-14 03:18:17 +00:00
Gerald Carter
74f2fc40db FIxed some unmarshalling problems with relstr and unistr arrays
jerry
(This used to be commit ce2d20395ae3d41d55030427f4b7b44ce87c605e)
2000-08-12 14:26:01 +00:00
Gerald Carter
60084f5271 code formatting cleanup
jerry
(This used to be commit 4bc5b8aa345b963e1247c6a364ba48a08fbd9764)
2000-08-10 14:02:07 +00:00
Gerald Carter
8e0e319674 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
(This used to be commit 880e81161640cd38540b06d982c592cbada51d40)
2000-08-10 04:10:29 +00:00
Gerald Carter
a08d444896 More work on AddPrinterDriver() and AddPrinterEx() client RPC's
Also fixed init_unistr() to deal with a NULL source character string.



-jerry
(This used to be commit 8ecd5dd52a6bd867f5d117352048ee43ce7254d9)
2000-08-09 20:14:29 +00:00
Gerald Carter
f296a8d087 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
(This used to be commit 3bf9a29f34ee4ade5180c5a0b0b9ff4aca7f0f08)
2000-08-08 06:57:48 +00:00
Gerald Carter
4fabc1ad0d spoolss_addprinterex() was adding the printer and returning the
correct handle, but was deleting the connection to the server.
Doh!!



--jerry
(This used to be commit 8e5e929561a1ae954bd60f7bd745d697438f835c)
2000-08-04 20:32:34 +00:00
Gerald Carter
4003a1c55b 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
(This used to be commit e15d9befd24cf5f3410c4be819b2a1fcf68048fb)
2000-08-04 12:46:36 +00:00
Jeremy Allison
7f36df301e 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.
(This used to be commit c55bcec817f47d6162466b193d533c877194124a)
2000-08-01 18:32:34 +00:00
Gerald Carter
a6ef985df4 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
(This used to be commit 45fbf31b698d6e754630590034cff712c0a716b1)
2000-07-31 14:50:53 +00:00
Jeremy Allison
5ec1642809 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.
(This used to be commit 0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4)
2000-07-27 00:47:19 +00:00
Jean-François Micouleau
1e3a5503cd 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.
(This used to be commit 883f7402d495182aeff85152216cc8b3cfc18bef)
2000-07-26 09:40:49 +00:00
Tim Potter
a4243b3d99 Fixed memory leak in modify_trust_password()
(This used to be commit 7145689bf55b9f3100632badac486fde30ee4972)
2000-07-26 03:04:01 +00:00
Gerald Carter
48a3e00224 some initial code for AddPrinterEx() project. Most is ifdef'd out
'cause it's not all written.


-jerry
(This used to be commit 2c0f6bcc8f926ee9c17de12671075e8a9239bb94)
2000-07-25 21:07:46 +00:00
Gerald Carter
74a9323bad * Added EnumPorts()
* Fixed an off-by-one bug noticed by JF in GetPrinterDriverDirectory()



jerry
(This used to be commit a9522f560da64045d928dabedeacdef0a6c3db51)
2000-07-21 20:03:18 +00:00
Gerald Carter
58221bfcf7 Fixed unitilized secdesc pointer which was causing spoolgetprinter
rpcclient command to fail on shared printers.




jerry
(This used to be commit c8abc31187dbfe6076277896b029fa11443e43bd)
2000-07-20 13:38:48 +00:00
Gerald Carter
17dba7ef05 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
(This used to be commit 84349394a988213724ca138e9692b3bc44fa0cb8)
2000-07-18 05:07:28 +00:00
Tim Potter
d39eaf1776 Reverted changes from rpcclient merge - contains memory leak!
(This used to be commit dea06ad7a554089a7394cdcb6bf5a766e8e8a6c3)
2000-07-17 05:40:48 +00:00
Gerald Carter
333c23c74a 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
(This used to be commit f8509356178deb7e78836d1f5aceb96677ac738b)
2000-07-15 08:37:17 +00:00
Gerald Carter
8213b96fd9 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
(This used to be commit 233b074f490b3b01f3a462284aa8117536df0082)
2000-07-14 17:04:04 +00:00
Gerald Carter
5af82b6d09 cleaned up access to prs_struct variables. Replaced all calls
prs_free_data() => prs_mem_free
	prs_realloc_data => prs_grow


--jerry
(This used to be commit 3d00e969df1800dadbb91fd8c410e9ce87188551)
2000-07-14 17:01:49 +00:00
Gerald Carter
c27ec4bfa0 removed references to loopback RPC connections.
added a few more kfunctions from TNG for rpcclient



--jerry
(This used to be commit 549d1d262115aeb2cd4d3f0122a5771be17752bb)
2000-07-14 16:59:41 +00:00
Gerald Carter
1c8c1c03a0 spoolenum commend (when compiled with the new prs_unistr())
now works.   :-)




jerry
(This used to be commit 588aadb29fbb7cc0e81ac19f95e97101a64dbd8e)
2000-07-10 19:57:30 +00:00
Tim Potter
541303d969 Fix for passing NULL pointer as an array parameter in
domain_client_validate()
(This used to be commit 3ee111bff78826a5ee419554d4ef2b2b2d3ae7aa)
2000-07-10 04:56:30 +00:00
Gerald Carter
d2b40a7de2 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
(This used to be commit 61d2aad5dc2b212b11c981f1eca47efa627e9fc8)
2000-07-07 06:20:46 +00:00
Gerald Carter
33f6a1d9bb 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
(This used to be commit 269051aa0c52728278a1d290148564f11cf7f189)
2000-07-03 04:28:29 +00:00
Andrew Tridgell
da44845a09 moved secrets fns into secrets.c
(This used to be commit f890bcf06786e7c63bf76fad2fd46d287a99a270)
2000-06-03 06:22:19 +00:00
Jeremy Allison
5a5540f87a 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.
(This used to be commit f0a7540831181d3a47e7f8ce8be55a36a2f2aba1)
2000-06-03 00:53:07 +00:00
Matthew Chapman
badb7fc0d2 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).
(This used to be commit 7710b4f48d3e8532df5e37f99a779758f750efdb)
2000-05-29 01:23:48 +00:00
Shirish Kalele
74d677ec59 Added the NETDFS pipe to allow remote administration of the msdfs symlinks
on the samba server.
(This used to be commit 15e7d8f6c5cddf6ce409ee2505744250d181ec34)
2000-05-18 18:43:53 +00:00
Jeremy Allison
a71519cf0c Cutover from 2.2.x - missed in merge.
Jeremy.
(This used to be commit 87c4d46abe82855dd23c94397c3fc8e245b3778a)
2000-05-17 02:08:55 +00:00
Andrew Tridgell
c23e01d049 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.
(This used to be commit f76c037255a6a79d11bec65e863e009a41a4f0fd)
2000-05-09 13:28:19 +00:00
Andrew Tridgell
2958dfcdf8 added secrets.tdb and changed storage of trust account password to use
it
(This used to be commit 88ad00b82acc4636ab57dfe710af08ea85b82ff1)
2000-05-08 10:42:21 +00:00