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

479 Commits

Author SHA1 Message Date
Andrew Tridgell
a3357ab493 changed string_sub() to replace " ; and ` in the inserted string with _
use all_string_sub() if you don't want this.
-
Andrew Tridgell
42d2509c9f global change from samba.anu.edu.au to samba.org -
Jeremy Allison
7a6f25ac4a Fixed problem with HAVE_NETGROUP being used on platforms
that cannot support it.
Jeremy.
-
Jeremy Allison
18ff93a9ab Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.
Tidied up some of the mess (no other word for it). Still doesn't
compile cleanly. There are calls with incorrect parameters that
don't seem to be doing the right thing.

This code still needs surgery :-(.

Jeremy.
-
Luke Leighton
0d21e1e609 - group database API. oops and oh dear, the threat has been carried out:
the pre-alpha "domain group" etc parameters have disappeared.

- interactive debug detection

- re-added mem_man (andrew's memory management, detects memory corruption)

- american spellings of "initialise" replaced with english spelling of
  "initialise".

- started on "lookup_name()" and "lookup_sid()" functions.  proper ones.

- moved lots of functions around.  created some modules of commonly used
  code.  e.g the password file locking code, which is used in groupfile.c
  and aliasfile.c and smbpass.c

- moved RID_TYPE_MASK up another bit.  this is really unfortunate, but
  there is no other "fast" way to identify users from groups from aliases.
  i do not believe that this code saves us anything (the multipliers)
  and puts us at a disadvantage (reduces the useable rid space).
  the designers of NT aren't silly: if they can get away with a user-
  interface-speed LsaLookupNames / LsaLookupSids, then so can we.  i
  spoke with isaac at the cifs conference, the only time for example that
  they do a security context check is on file create.  certainly not on
  individual file reads / writes, which would drastically hit their
  performance and ours, too.

- renamed myworkgroup to global_sam_name, amongst other things, when used
  in the rpc code.  there is also a global_member_name, as we are always
  responsible for a SAM database, the scope of which is limited by the role
  of the machine (e.g if a member of a workgroup, your SAM is for _local_
  logins only, and its name is the name of your server.  you even still
  have a SID.  see LsaQueryInfoPolicy, levels 3 and 5).

- updated functionality of groupname.c to be able to cope with names
  like DOMAIN\group and SERVER\alias.  used this code to be able to
  do aliases as well as groups.  this code may actually be better
  off being used in username mapping, too.

- created a connect to serverlist function in clientgen.c and used it
  in password.c

- initialisation in server.c depends on the role of the server.  well,
  it does now.

- rpctorture.  smbtorture.  EXERCISE EXTREME CAUTION.
-
Jeremy Allison
4c2b5a0098 Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf.
include/includes.h: Fix YP problem.
include/smb.h: Fix ZERO_STRUCTP.
lib/util_sock.c: Added strerror() in debugs.
passdb/ldap.c: Don't use snprinf, use slprintf.
rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf.
script/installman.sh: DGUX changes.
smbd/open.c smbd/oplock.c: Fixed gcc warnings.
web/swat.c: Changes USER to SWAT_USER.
-
Jeremy Allison
b62f008974 include/smb.h: Re-added zero pointer protection to ZERO_STRUCTP.
lib/util_sock.c: Added strerror() calls to getpeername failures (which seem to be giving IRIX trouble at the moment).
rpc_parse/parse_sec.c: Changed use of ZERO_STRUCTPN to ZERO_STRUCTP which again does zero pointer protection.
smbd/quotas.c: Fixed typo.
Jeremy.
-
Luke Leighton
06abdfd68e security descriptors.
kanji const char* warnings.
-
Jeremy Allison
9d05d80f81 include/kanji.h include/proto.h lib/kanji.c: Added const parameters in string wrappers.
printing/printing.c: Added OSF1 fix.
Jeremy.
-
Andrew Tridgell
49bf197103 extracted the password change code from smbpasswd and used it in swat
instead of opening pipes and other horrible stuff.
-
Andrew Tridgell
713864dd03 largely rewrote smbpasswd so that the code is understandable. This
should allow us to call a function in swat rather than piping to
smbpasswd.

while doing this I also fixed quite a few "const char *" versus "char *" issues
that cropped up while using const to track down bugs in the code. This
led to changes in several generic functions.

The smbpasswd changes should be correct but they have not been
extensively tested. At least if I have introduced bugs then we should
be able to fix them more easily than before.
-
Jeremy Allison
751856a09d Fix from richard.kettlewell@kewill.com for leapyear bugs.
Jeremy.
-
Luke Leighton
13a0ee851f changed syntax of registry commands so keys can start with HKLM or HKU.
sorted lookupsids command
-
Luke Leighton
36fcb4a6e6 rpcclient registry commands. -
Luke Leighton
d448906e68 util functions split into relevant modules, first pass. -
Jeremy Allison
bacd3e9d20 Makefile.in: Removed rpc_server/srv_ldap_helpers.c per J.F.'s instructions.
client/client.c:
client/clitar.c:
include/client.h:
smbwrapper/smbw_dir.c:
smbwrapper/smbw_stat.c:
smbwrapper/smbw.c:
lib/util.c: Converted all use of 'mode' to uint16.
smbd/quotas.c: Fixed stupid comment bug I put in there :-(.
printing/printing.c: Fix from J.F. to new code.
Jeremy.
-
Luke Leighton
373f60256f split socket util functions into util_sock.c. util.c NOT committed
and util_sock.c NOT included in Makefile.in.

registry commands added to rpcclient.

waiting for 2_0_0 split before committing modified files.  these files
are new modules, and are not referenced in the Makefile.in
-
Jeremy Allison
b5981c0149 lib/charcnv.c: Improved debug comment.
libsmb/namequery.c: Fix to remove 2 second wait is we are doing a unicast
                    and got a reply.
smbd/dfree.c:
smbd/noquotas.c:
smbd/quotas.c: Fixes from Dejan Ilic <svedja@lysator.liu.se> for the quota
               code.
utils/smbpasswd.c: Fixes to allow smbpasswd to be called from swat.
Jeremy.
-
Luke Leighton
71dfaa307e util_file.c:
split some routines out of various places (e.g smbpass.c) because
they now get used in more than one location.

util_sid.c:

need sid_copy, compare, split rid, append rid etc etc...
-
Luke Leighton
3f5feda674 split string and unicode string routines into these files.
these are *not* going to be added into the Makefile.in yet
so they still also exist in util.c.
-
Andrew Tridgell
d398ae487a added copyright notice from Patrick Powell -
Christopher R. Hertel
a1aa808d5b Just moving things around a bit.
Chris -)-----
-
Jeremy Allison
9cade656e2 Fixes to allow this to pass SGI compiler in -fullwarn mode (with one
annoying exception I'm still looking at :-).
Jeremy.
-
Jeremy Allison
1f225abfbe Quick fixes to fix the broken tree. Needed for my morning compiles.
Chris - feel free to fix these things differently if these fixes don't
work for you.
Jeremy.
-
Andrew Tridgell
99430ce899 fixed problem with snprintf.c and mkproto -
Andrew Tridgell
7a50ca81a5 use abort() instead of exit() in smb_panic()
the reason we don't return() here is that smb_panic() is used not just
for segv but also for detected errors (such as buffer overflows)
-
Andrew Tridgell
177b7b6b19 fixed handling of %.0f in replacement snprintf.c -
Andrew Tridgell
ae1888529b add ifdef for "long double" -
Andrew Tridgell
e2cb50af45 added a vsnprintf() implementation from cvslock. See the notes on the
license at the top of lib/snprintf.c

I've always been slightly uneasy about our half-baked vslprintf()
implementation and the risks on platforms that don't have vsnprintf()
so when I saw this code in another GPLd package I wanted it for Samba.
-
Christopher R. Hertel
fae161b905 Here is the simple debug parser and the debug2html converter. Still to do:
* Debug message filtering.
  * I need to add all this to Makefile.in
    (If it looks at all strange I'll ask for help.)

If you want to compile debug2html, you'll need to do it by hand until I
make the changes to Makefile.in.  Sorry.

Chris -)-----
-
Jeremy Allison
8e1ce307bd include/smb.h: Added #defines for lots of things - makes our code a *lot* easier to read.
lib/util.c: Fixed Luke's set_first_token() function - should return void.
smbd/close.c: Move delete_on_close into file_fd_struct structure.
smbd/ipc.c: Changed local_machine back to fstring.
smbd/nttrans.c: Use defines for mapping share modes.
smbd/open.c: Move delete_on_close into file_fd_struct structure, added code for ALLOW_SHARE_DELETE.
smbd/reply.c: Use defines for mapping share modes.
smbd/trans2.c: Move delete_on_close into file_fd_struct structure.
Jeremy.
-
Luke Leighton
b4ae65e2d0 rpctorture command -
Luke Leighton
da40f26f4b domain aliases added a bit better: does local aliases if you query
for sid S-1-5-20 and does (nothing at the moment) if you query for
your own sid.
-
Luke Leighton
c101113ec2 fixing smbd encrypted rpcs (data lens, alloc hints, sequence nums argh).
put unicode strings after SAMLOGON query regardless of whether it's
an NT mailslot or a non-NT mailslot, after having observed this behaviour
out of NT machines.
-
Jeremy Allison
dbdbce29f5 Fixed bug found by John Blair where trim_string wasn't
correctly trimming trailing multibyte code page strings.
Jeremy.
-
Luke Leighton
05a297e3a9 some quite important bug-fixes i missed because i transferred the wrong
smb.tgz file from my portable.

particularly the call to mem_data followed by a realloc of that data in
cli_pipe.c's rpc_read() function.

smbd responses now use p->rdata_i which is a faked-up pointer into
p->rdata's response data.  rdata can be very long; rdata_i is limited
to point to no more than max_tsize - 0x18 in length.  this will make
it an almost trivial task to add the encrypted rpc headers after
rdata_i, and mem_buf_copy will cope admirably with rhdr chained to
rdata_i chained to auth_verifier etc etc...
-
Andrew Tridgell
72bce217ef removed setenv(), replaced with smbw_setenv() -
Luke Leighton
fcfb40d2b0 - dce/rpc code
- removed debug info in struni2 and unistr2 (security risk)

- rpc_pipe function was getting pointer to data then calling realloc *dur*

- password check function, the start of "credential checking",
  user, wks, domain, pass as the credentials (not just user,pass which
  is incorrect in a domain context)

- cli_write needs to return ssize_t not size_t, because total can be -1
  if the write fails.

- fixed signed / unsigned warnings (how come i don't get those any more
  when i compile with gcc???)

- nt password change added in smbd.  yes, jeremy, i verified that the
  SMBtrans2 version still works.
-
Andrew Tridgell
5abdb70e2a removed an incorrect comment -
Jeremy Allison
b8b781191d Fixed sys_lseek and seek_file calls so all returns
are *checked* :-).
Jeremy.
-
Jeremy Allison
60dc1a4a00 Small tidyups for gcc in 'preen' mode....
Jeremy.
-
Jeremy Allison
04d79a9ae5 Re-added code to tell the user how many open files they
have. Needed for server diagnosis purposes...
Jeremy.
-
Luke Leighton
c48ee2bfba second implementation of crc32, used with permission of francesco ferrara
<francesco@aerre.it>.  thanks!
http://www.aerre.it/francesco
-
Luke Leighton
8b9c0bad88 more warnings... -
Luke Leighton
69f5f9f889 dce/rpc -
Luke Leighton
0b90442021 signed / unsigned issues spotted by herb -
Luke Leighton
62fdeef1b7 dce/rpc -
Luke Leighton
0067e45d41 added "permission obtained from John Erickson <jerickson@ddj.com> ...." -
Luke Leighton
73667141af crc32 algorithm. obtained from dr dobb's journal
http://www.ddj.com/ftp/1992/1992.05/crcman.zip.
copyright 1992 mark r nelson.
-
Andrew Tridgell
a9e0e5895a remove unused arguments from some static functions. -