1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

4400 Commits

Author SHA1 Message Date
Gerald Carter
a19339b3ac minor formatting fixes.
jerry
(This used to be commit 95355d2cf26f51b1f928b8a020a4a731483be0b8)
2000-08-14 03:18:17 +00:00
Gerald Carter
e2bb0779af fix for new_smb_io_relarraystr() and new_smb_io_relstr()
to use spool_smb_io_unistr() as this does not call prs_align()
befrore parsing the UNISTR.

Parsing a void* buffer from an RPC should not be aligned
on 4 byte boundaries.  Don't think this change affects
any marshalling code, only unmarshalling...




jerry
(This used to be commit bc154e8522a75540a8504195c1e6f45739167e6b)
2000-08-14 03:17:17 +00:00
Gerald Carter
13913e2c97 removed the prs_align in spoolss_smb_io_unistr() (JF, please check)
as it was throwing things off when parsing buffers passed in SPOOLSS
RPCs

fixed the unmarshalling of UNISTR arrays to be double NULL terminated




jerry
(This used to be commit 236f19659cea87cc35128990954d30c43114b889)
2000-08-12 14:51:36 +00:00
Gerald Carter
2ca88a0f2d fixes to prs_unistr UNMARSHALLING only. Problem was due to talloc's
of 0 bytes.



jerry
(This used to be commit 3fcc59ba928250759bbf3ef46d7c118950a5ba6f)
2000-08-12 14:31:29 +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
cf023a7ce0 fixed unistr_to_ascii to deal with NULL src strings
jerry
(This used to be commit 8e95aae1709a9be28d6e25ff6f0fdc729dc09274)
2000-08-12 14:20:40 +00:00
Gerald Carter
95496b974a reworked talloc() to in order to help track down invalid
memory access.

Tridge, I don't think using 0xdeadbeef for size allocations
of 0 is going to work.  I ended up having to use NULL
as much code that works on UNISTR checks to see if the buffer ptr
is NULL.  So valid code ends up with a seg fault.

Rather than rewriting it all, I added a DEBUG_TALLOC
#ifdef in talloc.h that sets a macro BAD_PTR.
This is the value assigned to ptr for an allocation of 0 bytes.



jerry
(This used to be commit 233b9cffa2350552d9f775f791d5d5e0464a1ed4)
2000-08-12 14:14:40 +00:00
Gerald Carter
50cef4fa0d removed (void) typecast from SMB_ASSERT
jerry
(This used to be commit f806881e6c2c94c03fb7e70d92cd0a5a3fc30fbd)
2000-08-12 14:10:27 +00:00
John Terpstra
69fc6695c5 Updated by Patrick Powell <papowell@lprng.org>
(This used to be commit 3361c144f5ba2a87a469436f670ab35189021d49)
2000-08-12 02:41:42 +00:00
Jeremy Allison
f6795780eb Fixed the problem with UNISTR marshalling in a buffer5 struct.
The smb_io_unistr() code called a prs_align, this was not being
counted in the size or taken account of in the offset calculation.
Fixed size_ calculation to always return a size a multiple of 4
and also set the offset correctly. This fixes the problem I saw
and will hopefully fix the problem HP reported. JF please check
this change.
Jeremy.
(This used to be commit ceba9f3dcdb4bddae17ec0024692c9074086302d)
2000-08-11 23:13:09 +00:00
Christopher R. Hertel
726e7e256e First shot at actually *doing* WINS failover.
If libsmb/namequery.c:name_query() times out while doing a non-broadcast
query, I mark that WINS server 'dead'.  Note that I don't try the new
WINS server.  I think I can get that working too.

This is only for queries, not registrations.  The biggest problem is that
I may have to fiddle with the UNICAST SUBNET, but I need to check talk
that over with someone (Jeremy?) before I hack at it.

I can't actually test the above change, I'm 'fraid.  I'm getting:

4 errors detected in the compilation of "rpc_server/srv_spoolss_nt.c".

in head branch.

Chris -)-----
(This used to be commit 40ae638866e3d826ccd5d827672634959c31b039)
2000-08-11 22:29:44 +00:00
Jeremy Allison
295d684f53 Fix case where volumename could be returned as UNIX charset or DOS codepage
depending on where it came from.
Jeremy.
(This used to be commit cfbf78085d48671e5be382e7486953a85a893be1)
2000-08-11 00:53:13 +00:00
Jeremy Allison
137b7f873a Added "add_printer_hook" call to update printer for Win9x clients.
Patch from John Reilly <jreilly@hp.com>.
Jeremy.
(This used to be commit 76a5713bd3fad18ec60d12fc3f965f3e9717c159)
2000-08-10 23:41:16 +00:00
Jeremy Allison
1e823bc781 Tidied up security rights definitions.
Jeremy.
(This used to be commit e466c863f5540e13776f4477b6d58e3fbfe7276d)
2000-08-10 19:51:45 +00:00
Jeremy Allison
1e46bde597 Removed requirement that sid have an owner before being interpreted.
Thanks to Elrond for pointing this out.
Jeremy.
(This used to be commit 1d9a5494f8214b8d6171073f4090687a8535d78c)
2000-08-10 17:48:15 +00:00
Gerald Carter
536a055a9a Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles.



jery
(This used to be commit 206565368b887ba83791efe018f24175e6f31137)
2000-08-10 14:05:19 +00:00
Gerald Carter
7ce5aacf7e working on the unmarshalling of dependentfiles to a DRIVER_INFO_3
struct.  Not wuite there.





jerry
(This used to be commit 1a145977f09654fc51ebcd40ef7a2aa69aa96cfb)
2000-08-10 14:03:13 +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
2f9a0f83fe deal with allocation size of 0 in prs_unistr when UNMARSHALLING
jerry
(This used to be commit 26a73a70e282a5e46cc2b6fe7bc09b406724c9dd)
2000-08-10 14:00:40 +00:00
Gerald Carter
f488740112 Deal will NULL UNISTR in unistr_to_ascii
jerry
(This used to be commit cfa4c878a2ccaf346940f8f4a201737e185f76d6)
2000-08-10 14:00:05 +00:00
Gerald Carter
0a86b83a86 talloc returns 0xdeadbeef when asked to allocate 0 bytes
jerry
(This used to be commit df51dc32f6ffc4fe2cebfaae5079417aad1ff34d)
2000-08-10 13:58:15 +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
Jeremy Allison
92a54ac60c Fixed bug in new printer access check code. If PRINTER_ALL_ACCESS is changed
in the ACE's the same thing must be done in the desired access or they will
never match. This took me a while to find... :-).
Jeremy.
(This used to be commit 066520979b2b5d967e6e1d77f16185a5fb19dc0c)
2000-08-09 23:19:50 +00:00
Gerald Carter
86833bbd56 make proto
(This used to be commit ad74885e4730da2a15ff00e13f490f3f0b1be10d)
2000-08-09 20:19:37 +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
Jeremy Allison
e3048cfc0b Fixed memory leak with NT tokens.
Added debug messages to se_access_check().
Added FULL_ACCESS acl to default acl on printers.
Jeremy.
(This used to be commit 7507f6f408cf8b0f8d7e2b3da54ce5fb5ef5343b)
2000-08-09 18:40:48 +00:00
Andrew Tridgell
fadb15da71 got error code right for printer update/add failure
(This used to be commit 0d00d2ec258b36d73e865f06d5d11745d7cdafa9)
2000-08-09 07:34:35 +00:00
Andrew Tridgell
64f6dd86a8 add printer admin docs
(This used to be commit 1342f2e5be28d1582ab39ec837392fbf9e721014)
2000-08-09 04:25:01 +00:00
Andrew Tridgell
db24453581 added printer admin option
any user in that list can do anything to a printer
(This used to be commit 7b5912be150dd590d6195be40b0976305b8716ba)
2000-08-09 04:19:18 +00:00
Gerald Carter
0756908d55 Fixed AddPrinterDriver()
jerry
(This used to be commit 39d025693eadf4ca1c4fe17dd9110bb8a647f361)
2000-08-09 02:04:25 +00:00
Andrew Tridgell
0d7df3ee01 fixed help string
(This used to be commit 16afa46797a4cdaa6e3b668caf6d910c08bec9b4)
2000-08-09 00:11:01 +00:00
Jeremy Allison
04de6d0258 Found the sec_ctx_stack overflow - a become_root() should have been an
unbecome_root() - typo.
Jeremy.
(This used to be commit ebb160663ed55e44e44f1c3d17eb077a32c2ffb9)
2000-08-08 23:49:26 +00:00
Jeremy Allison
b4d1e192cd Added SID "Everyone" S-1-1-0 as always matching if present in an ACE.
Jeremy.
(This used to be commit b3a1038ac1bfb0c32e64f6cb26e5e46fbda794a2)
2000-08-08 21:51:22 +00:00
Jeremy Allison
0cabe327ef Changed the sec desc access checks to match the spec. Needs testing.
Jeremy.
(This used to be commit 5a4a7cd4727df5d1b5e71d343e776c7df52dc515)
2000-08-08 19:34:34 +00:00
Gerald Carter
d5e17b34ec make proto
(This used to be commit 74074072cf244d221f8f9b09302d0cbc85d689d4)
2000-08-08 07:23:20 +00:00
Gerald Carter
3a123d2572 cleanup in init_unistr2_from_unistr()
--jerry
(This used to be commit 1e00ac19cd001024fa8007eff5137aac877796fa)
2000-08-08 06:59:35 +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
8705fbc42c it is not my day it seems. :-(
Fixed missing )


j-
(This used to be commit 7b69cbbde36e51f8f7b74691428a04e8871d8b4a)
2000-08-05 19:18:25 +00:00
Gerald Carter
cfb5d7d84c removed the for() loop to copy the buffer in init_unistr2_from_unistr()
Replaced with a memcpy()



Forgot to commit this a few moments ago


j-
(This used to be commit 34d4fb54c3121d31cb8b29193f71d5e7b5471cdc)
2000-08-05 19:03:00 +00:00
Gerald Carter
139dcbb0bf Fixed bug in init_unistr2_from_unistr() found by Elrond.
Thanks :-)





j-
(This used to be commit 4ecd15cd5851e94808756e3da0ce6a066f0a0cd7)
2000-08-05 18:58:45 +00:00
John Terpstra
754f021fc7 Adding build file.
(This used to be commit b87c47cc8638a1930e55a45a126a778b188ce688)
2000-08-04 21:03:10 +00:00
John Terpstra
48b47496cc Adding build system files for Caldera OpenLinux.
(This used to be commit 8de3786f5ad473aab90bb3fbf7e6ca2714f91751)
2000-08-04 20:53:28 +00:00
Gerald Carter
dd3479dfe4 make proto
(This used to be commit dfd6b51bc7fb61d25af3074c386ce51cf3bc86f4)
2000-08-04 20:47:06 +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
Jeremy Allison
b3b512264d Fixed up se_access_check() to use the token list from the user struct
as the SID list. Now to go through and tidy up the algorithm.
Jeremy.
(This used to be commit 1f7300df6713a6728feb1600ca7e62fc213232fc)
2000-08-04 19:56:58 +00:00
Volker Lendecke
e2031ab34c Added my course notes. Had asked Jeremy some weeks ago.
It's german language, feel free to remove it again.

Volker
(This used to be commit a40f22427a05903dfb98e9cb849698b33b8bca90)
2000-08-04 16:08:04 +00:00
Gerald Carter
05e169b558 make proto
(This used to be commit 6bdb7d5c9787bd16e851f5c751d952c4df8ccc5b)
2000-08-04 13:30:52 +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
Gerald Carter
394795e28b After talking with Jeremy and JF (and staring at packet traces between
NT <-> NT), I've come to realize that UNISTR2 strings should be NULL
terminated.




jerry
(This used to be commit c8f9e54beafcb0c0668f1510e7693dbf22485aa8)
2000-08-04 12:42:19 +00:00
Tim Potter
553579bf6f In cli_error() return ENOENT when an ERROR_INVALID_NAME is received instead
of the generic EINVAL.
(This used to be commit a290107aee01a85ca1ef5565f23c8f00e18e98c2)
2000-08-04 06:13:05 +00:00