1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

305 Commits

Author SHA1 Message Date
Jeremy Allison
e1b1b6fb67 Luke, I am moving the code back into passdb/passdb.c, this the correct
place to do this, not in smbd/passwd.c

Please don't change this without asking first, I have run this past
Andrew so talk to him (I'm on vacation next week).

I also removed the g_newXXX macros. There are essentially a private C extension,
not used anywhere else in the code, and add no functionality over malloc(XX)
and make the code harder to understand (everyone knows what malloc does).

Jeremy.
-
Luke Leighton
bd34f65239 dynamic allocation of NET_USER_INFO_3 gids.
jeremy, the intent is to call se_access_check() with usr-sid, grp-sid,
array-of-group-rids (but array-of-group-sids would do).

please do look at smbd/lanman.c's api_NetWkstaGetInfo, it will show you
that we really do need to store the entire NET_USER_INFO_3 structure.

then again, api_NetWkstaGetInfo is only used by win9x so who cares :)
-
Jeremy Allison
6c7adeab0f Moved tdb functions that access parse structs into parse_prs.c
to prevent builkd breaking.
Jeremy.
-
Jeremy Allison
341d07c516 Cause printer SD's to be displayed correctly (full control).
Jeremy.
-
Jeremy Allison
8ef41f31c5 Fixing get/set of security descriptors.
Removed ugly hack for NT printing.
Fixed up tdb parse stuff memory leaks.
Jeremy.
-
Jeremy Allison
34b63896ab Memory leak fixes.
Jeremy.
-
Jeremy Allison
03cd4aa144 Some tidyup fixes (memory leaks etc.). Still no progress with the
"no driver" issue. I'm banging my head against comparitive packet
dumps right now...
Jeremy.
-
Andrew Tridgell
6506e6f470 simple increment bug in uniarray_2_dosarray -
Andrew Tridgell
417a88fc6a no space was being reserved for the security descriptor in the parse
buffer
-
Andrew Tridgell
b152d75ea6 sec_desc_size() needs to handle a null secdesc -
Jeremy Allison
ac383bb765 More memory leak and PANIC action fixes.
This is *horrible* code :-(.
Jeremy.
-
Jeremy Allison
48a8031826 Fixed null pointer indirect in addprinterex. Still working on problem
with extra directory layer in NT drivers.
Jeremy.
-
Jeremy Allison
3cdcfa6325 More insure found memory leak and corruption fixes.
Jeremy.
-
Jeremy Allison
eba31e4e80 Back to building. Now to test with insure.
Added some frees needed to stop memory leaks.
Jeremy.
-
Jeremy Allison
c2099cfb03 Getting back to a compilable state (not there yet but close).
Added patches for random -> sys_random.
Added set_effective_xxx patches for AFS code.
Memory allocation changes in spoolss code.
Jeremy.
-
Andrew Tridgell
7030b7f06a init_unistr takes a const 2nd arg
(ps: I hate const)
-
Luke Leighton
726c359d1d moved notif_y_table struct to spoolss_nt.c only used there.
#ifdef'd driver-code out with define RELIES_ON_SMBD_SPECIFIC_CODE because
spoolssd doesn't link with smbd/*.c (find_service("print$") is not
possible).
-
Luke Leighton
3f976e7139 hack to get setprinter working, level2, null sec desc. -
Luke Leighton
f9f2a04fdb security descs in spoolss. needs parse_sec.c nttrans.c broken. -
Shirish Kalele
590d9ece84 Fixed memory leak in RPC parsing code.
Problem in prs_set_buffer_size() was Realloc returns a NULL when newsize is zero (equivalent to a free()). We were returning a failure here without resetting the buffer_size or the data_p pointer in the prs_struct. And we weren't checking for a failure from prs_set_buffer_size(). So realloc's to zero size were not reflected in the prs_struct: memory leak.
-
Andrew Tridgell
4fef181af3 a fairly big change in spoolss.
got rid of the forms, drivers and printers files in the nt drivers
directory and instead use a single tdb

note that this is _not_ all finished.
-
Shirish Kalele
15e7d8f6c5 Added the NETDFS pipe to allow remote administration of the msdfs symlinks
on the samba server.
-
Jeremy Allison
aa1a4f46da Fixed bug I introduced last night (sorry). Now truncate incoming prs_struct
buffer size to exact size of incoming data to prevent read overruns into slop
space.
Jeremy.
-
Jeremy Allison
1c3193aa1c Fixed bug where mallocd size of prs_struct could be larger than
incoming packet. Ensure new alloced memory is zeroed before use.
Jeremy.
-
Jeremy Allison
b090cff4b5 Synced up srv_samr with HP changes. Added error checking to original code
- what a concept :-). All this code will be replaced with TNG stuff anyway,
so not a big deal....
Jeremy.
-
Jeremy Allison
a148cb9962 Added Shirish's reg changes to HEAD. Sync up with 2.2.0 backport.
Also added prs_xx error return checks to new code in rpc_parse/parse_reg.c
Jeremy.
-
Andrew Tridgell
87d9bac3a1 don't call prs_dump() here -
Andrew Tridgell
a42da20536 update grow_size in prs_grow -
Andrew Tridgell
0e7819bb45 make prs_dump() store up to 100 variants of each msg type -
Andrew Tridgell
4de7202da4 changed uniarray_2_ascarray to uniarray_2_dosarray -
Jeremy Allison
eefbfb5e16 Added unicode_to_dos_char() function to address converting single UNICODE
characters to one or more DOS codepage characters.
Jeremy.
-
Andrew Tridgell
974813f0d4 added spool_io_printer_driver_info_level_6()
thsi function and the associated header structure were autogenerated
using a little awk based code geerator I wroe ths evening. I'll commit
that next ...
-
Andrew Tridgell
d178c00aae more merging
it is now at the stage that winbindd can compile in the head branch,
but not link
-
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.
-
Jeremy Allison
577ddbfbec Insure uninitialized memory read fixes.
Jeremy.
-
Andrew Tridgell
e72a571853 added support for deleting printers into the spoolss system -
Shirish Kalele
99d07e1352 Added info level 1005 to netsharegetinfo (is the share a DFS root)
Added dfs_server announcement in set_default_server_announce_type()
-
Andrew Tridgell
d7cd7c88fd moved trans2.h and nterr.h into includes.h with all our other includes -
Jeremy Allison
c2aa6d66b3 rpc_parse/parse_rpc.c: Changes from TNG (thanks Luke) for NTLMSSP parsing.
smbd/reply.c: Fixed typo in debug.
Jeremy.
-
Jeremy Allison
9a118cd4a2 Modified interfaces and added checks around *all* *alloc calls
so that errors are returned on memory allocation failure.
Jeremy.
-
Jean-François Micouleau
cef44398f9 off by one error ...
J.F.
-
Jean-François Micouleau
396f73c11b changed all the status code to ERROR_xxx instead of NT_STATUS_xx which are
wrong in the spoolss case.

fxed a bug in the job notify code (that's the polite answer), the truth is
different: there is a bug in the NT spooler service, including SP6a and
NT2K.

changed the default lpcommand in the LPRNG case.

	J.F.
-
Tim Potter
b912fb7dd2 Fixed spelling of Andrew's name. (-: -
Jean-François Micouleau
c212fbe009 rewrote getprinterdriver level 3, now correctly handle the dependent
files.
A number of memleak fixed
some error return values fixed.

	J.F.
-
Jeremy Allison
53721fbc7d rpc_parse/parse_spoolss.c: Added checks on mallocs/overflow checks on all prs_xx
calls.
smbd/connection.c: Fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
-
Jeremy Allison
f02999dbf7 acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.
include/byteorder.h: Added alignment macros.
include/nameserv.h: Added defines for msg_type field options - from rfc1002.
lib/time.c: Typo fix.
lib/util_unistr.c: Updates from UNICODE branch.
printing/nt_printing.c: bzero -> memset.
smbd/connection.c: Added check for UT_SYSLEN for utmp code.

Other fixes : Rollback of unapproved commit from Luke.
Please *ask* next time before doing large changes to HEAD.

Jeremy.
-
Luke Leighton
cfaea90529 added the following message to all dce/rpc client/server code, except
the spoolss code (it's cut from TNG) and the smb-dce/rpc interface
code that jeremy has been working up to TNG-functionality.

i also want this message to go into SAMBA_2_0 and SAMBA_2_0_RELEASE,
because it is intolerable that potentially good modifications be made
to code that is going to be thrown away, and people waste their time
fixing bugs and adding enhancements that have already been carried
out already, up to two years ago in the TNG branch.

/*
 * THIS CODE IS OUT-OF-DATE BY TWO YEARS, IS LEGACY DESIGN AND VERY, VERY,
 * INCOMPLETE.  PLEASE DO NOT MAKE ANY FURTHER ENHANCEMENTS TO THIS CODE
 * UNLESS THEY ARE ALSO CARRIED OUT IN THE SAMBA_TNG BRANCH.
 *
 * PLEASE DO NOT TREAT THIS CODE AS AUTHORITATIVE IN *ANY* WAY.
 *
 * REPEAT, PLEASE DO NOT MAKE ANY MODIFICATIONS TO THIS CODE WITHOUT
 * FIRST CHECKING THE EQUIVALENT MODULE IN SAMBA_TNG, UPDATING THAT
 * FIRST, *THEN* CONSIDER MAKING THE SAME MODIFICATION IN THIS BRANCH
 *
 * YOU WILL, ALMOST GUARANTEED, FIND THAT THE BUG-FIX OR ENHANCEMENT THAT
 * YOU THINK IS NECESSARY, HAS ALREADY BEEN IMPLEMENTED IN SAMBA_TNG.
 * IF IT HAS NOT, YOUR BUG-FIX OR ENHANCEMENT *MUST* GO INTO SAMBA_TNG
 * AS THE SAMBA_TNG CODE WILL REPLACE THIS MODULE WITHOUT REFERENCE TO
 * ANYTHING IN IT, WITH THE POSSIBLE RISK THAT THE BUG-FIX OR ENHANCEMENT
 * MAY BE LOST.
 *
 * PLEASE OBSERVE AND RESPECT THIS SIMPLE REQUEST.
 *
 * THANK YOU.
 *
 * lkcl@samba.org
 */
-
Jean-François Micouleau
4847f7b17b oops ! forgot smb.h in last commit
added info level 1 parsing code for addprinter(ex)

	J.F.
-
Jean-François Micouleau
07f2e194ba parse correctly getprinterdriver2
found a stupid bug in enumprinters
fixed some memleaks
found a coredump in enumprinterdata
getprinterdriverdir responds correctly now.

	J.F.
-
Jean-François Micouleau
87da4404ab getprinter level 0: was to short, found most of the fields, undocumented,
undecoded, nothing in MSDN, but now it works :-)

cleanup of error codes.
fixed some dfs declarations function.

	J.F.
-