1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00

4458 Commits

Author SHA1 Message Date
Jeremy Allison
f94f37dcab Tidied up extra ()'s.
Jeremy
-
Jeremy Allison
be4e5eeb4f Reverted the change Luke made. Removed IS_BITS_SET_XX macros.
Do not re-add them. These macros are unsafe as they are not understood.
Change all TNG code using them to correct '&' and '|' please.
IS_BITS_SET_ALL was being used in cmd_interp.c when IS_BITS_SET_SOME
should have been used.
Jeremy.
-
Tim Potter
604f6a34ef Merge. -
Gerald Carter
bd4c83eb40 fixed a few bugs in new_smb_io_relarraystr().
Marshalling code path now uses spoolss_smb_io_unistr()
also caught a NULL pointer case.

i'll update TNG later.
-
Tim Potter
9af82423d2 NT printer permissions test program. -
Luke Leighton
bc065f9597 restored IS_BITS_SET_xxx macros. -
Luke Leighton
8fe195df0b hey, jerry: turns out you _have_ converted to get_safe_nt_errmsg!!!
[got confused with which way dirdiff was going :)].

... but you forgot to update TNG's lib/cmd_interp.c...
-
Luke Leighton
b2e044f89d jeremy,
please do not remove IS_BITS_SET_XXX macros just because you happen
"not to like them".  whilst still working on merging, you are not
responsible for this code, therefore do not hinder its development
whilst people are attempting to do merges.  after the merge from
TNG to cvs main is completed, you can do what the hell you like.

thank you.


jerry,

please could you consider adding underlying routines (in this case
get_safe_smb_errstr()) instead of reverting to a [less secure]
previous coding method.  thanks.
-
Gerald Carter
95355d2cf2 minor formatting fixes.
jerry
-
Gerald Carter
bc154e8522 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
-
Gerald Carter
236f19659c 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
-
Gerald Carter
3fcc59ba92 fixes to prs_unistr UNMARSHALLING only. Problem was due to talloc's
of 0 bytes.



jerry
-
Gerald Carter
ce2d20395a FIxed some unmarshalling problems with relstr and unistr arrays
jerry
-
Gerald Carter
8e95aae170 fixed unistr_to_ascii to deal with NULL src strings
jerry
-
Gerald Carter
233b9cffa2 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
-
Gerald Carter
f806881e6c removed (void) typecast from SMB_ASSERT
jerry
-
John Terpstra
3361c144f5 Updated by Patrick Powell <papowell@lprng.org> -
Jeremy Allison
ceba9f3dcd 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.
-
Christopher R. Hertel
40ae638866 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 -)-----
-
Jeremy Allison
cfbf78085d Fix case where volumename could be returned as UNIX charset or DOS codepage
depending on where it came from.
Jeremy.
-
Jeremy Allison
76a5713bd3 Added "add_printer_hook" call to update printer for Win9x clients.
Patch from John Reilly <jreilly@hp.com>.
Jeremy.
-
Jeremy Allison
e466c863f5 Tidied up security rights definitions.
Jeremy.
-
Jeremy Allison
1d9a5494f8 Removed requirement that sid have an owner before being interpreted.
Thanks to Elrond for pointing this out.
Jeremy.
-
Gerald Carter
206565368b Working on spoolss_getprinterdriver() as it does not display all the
dependentfiles.



jery
-
Gerald Carter
1a145977f0 working on the unmarshalling of dependentfiles to a DRIVER_INFO_3
struct.  Not wuite there.





jerry
-
Gerald Carter
4bc5b8aa34 code formatting cleanup
jerry
-
Gerald Carter
26a73a70e2 deal with allocation size of 0 in prs_unistr when UNMARSHALLING
jerry
-
Gerald Carter
cfa4c878a2 Deal will NULL UNISTR in unistr_to_ascii
jerry
-
Gerald Carter
df51dc32f6 talloc returns 0xdeadbeef when asked to allocate 0 bytes
jerry
-
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
-
Jeremy Allison
066520979b 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.
-
Gerald Carter
ad74885e47 make proto -
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
-
Jeremy Allison
7507f6f408 Fixed memory leak with NT tokens.
Added debug messages to se_access_check().
Added FULL_ACCESS acl to default acl on printers.
Jeremy.
-
Andrew Tridgell
0d00d2ec25 got error code right for printer update/add failure -
Andrew Tridgell
1342f2e5be add printer admin docs -
Andrew Tridgell
7b5912be15 added printer admin option
any user in that list can do anything to a printer
-
Gerald Carter
39d025693e Fixed AddPrinterDriver()
jerry
-
Andrew Tridgell
16afa46797 fixed help string -
Jeremy Allison
ebb160663e Found the sec_ctx_stack overflow - a become_root() should have been an
unbecome_root() - typo.
Jeremy.
-
Jeremy Allison
b3a1038ac1 Added SID "Everyone" S-1-1-0 as always matching if present in an ACE.
Jeremy.
-
Jeremy Allison
5a4a7cd472 Changed the sec desc access checks to match the spec. Needs testing.
Jeremy.
-
Gerald Carter
74074072cf make proto -
Gerald Carter
1e00ac19cd cleanup in init_unistr2_from_unistr()
--jerry
-
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
-
Gerald Carter
7b69cbbde3 it is not my day it seems. :-(
Fixed missing )


j-
-
Gerald Carter
34d4fb54c3 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-
-
Gerald Carter
4ecd15cd58 Fixed bug in init_unistr2_from_unistr() found by Elrond.
Thanks :-)





j-
-
John Terpstra
b87c47cc86 Adding build file. -
John Terpstra
8de3786f5a Adding build system files for Caldera OpenLinux. -