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

947 Commits

Author SHA1 Message Date
Jeremy Allison
e74428e428 Fixed aggregate initializer problem for gcc.
Jeremy.
-
Christopher R. Hertel
8759bec11b Changes include:
proto.h:  The unusual.  ;)
reply.c:  I changes some function names, and updated reply.c to match.
          See mangle.c below for more.
server.c: Changed function names and parameters in file mangle.c, so
          changed server.c calls to match.  See mangle.c below for more.

mangle.c:

  I replaced the caching mechanism used for caching reverse mangled name
  maps.  The old method was a large array of 256-byte strings.  Movement
  in the stack (including push and pop) was done by memcpy()ing whole
  chunks of memory around.

  The new system uses the ubi_Cache module which, in turn, uses a splay
  tree.  Entries are dynamically allocated using a minimum amount of
  memory.  Searches are non-linear, which should speed things up a bit,
  too.  Overall, this should save memory and be faster.

  Other changes:  I streamlined the is_mangled() test and made other
  speed enhancements including replacing some static functions with
  macros.  Added comments, etc.

Note:  Per an E'mail conversation with Andrew, the 'mangled stack'
       parameter in smb.conf doesn't do anything anymore.  The cache is
       now set for 16K bytes maximum memory usage.  The mangle stack
       parameter is silently ignored.  This can easily be changed, but
       I'd rather introduce a 'mangled cache memory' parameter and
       remove 'mangled stack'.

Remaining problems:
       While testing the module, I noticed that something is calling
       name_map_mangle() twice.  The result is that names which contain
       illegal characters are getting mangled twice.

       Also, the entire module works by overwriting the input string.
       This has a variety of nasty side effects.

Summary:

  There's a lot still to be done, but the changes I have in place *should*
  work in exactly the same way (except for the mangle stack parameter).
  The rest of the bugs and other issues are separate.

Chris -)-----
-
Jeremy Allison
cd2613c572 Changes to allow Samba to be compiled with -Wstrict-prototypes
with gcc. (Not a big change although it looks like it :-).

Jeremy.
-
Andrew Tridgell
30a347de74 fixed a memory leak in close_file(). Each time a file was opened
we leaked memory equal to the length of the filename.
-
Andrew Tridgell
dd3fe9fb47 minor reformatting of debug messages (so people don't think there is a
. on the end of their host names)
-
Andrew Tridgell
02786747ee some hacks to the torture code -
Andrew Tridgell
ce017a233b support O_SYNC at open time in files (previously we only supported it
on individual writes)
-
Andrew Tridgell
d361a06fa1 if the resolve order is blank then assume "host" -
Andrew Tridgell
000b871839 support O_SYNC in opens for smbtorture -
Richard Sharpe
241fde3c71 Fix heaps of warnings when compiling with gcc under Digital UNIX. Include route.h
and mbuf.h at a strategic point ... Wierd stuff really, because the Digital
compiler does not complain either way, but GCC does.
-
Richard Sharpe
c95097501a Oops, fogot proto.h. It needs to be updated for changes to client.c -
Richard Sharpe
0c228f0b33 Changes to client.c support the need for directories to be processed by whatever
action is passed to do_dir.

Changes to clitar.c as requested by Canon Information Systems Research Australia:

1. Support restoring long file names
2. Write directory entries to TAR files as first part of setting directory create
   times
3. Ensure zero length files get correct mtime
4. Allow DOS and UNIX pathnames in command line parameters.
-
Jeremy Allison
52e3966fbc includes.h: Moved HPUX undefine of SEMMSL to where it actually does something.
ipc.c: Added Luke's debug statement.
locking_slow.c: Added FTRUNCATE_NEEDS_ROOT code for broken systems that
need it (not sure what these are yet).

membuffer.c ntdomain.h proto.h
lib/rpc/include/rpc_dce.h lib/rpc/include/rpc_srvsvc.h
lib/rpc/parse/parse_prs.c lib/rpc/parse/parse_rpc.c
lib/rpc/server/srv_pipe_hnd.c lib/rpc/server/srv_util.c:
   Re-merge of Luke's NTDOM changes 'cos he's a lazy git with
   carpel tunnel syndrome :-).

Jeremy.
-
Jeremy Allison
5d6f63a7e6 Fix for [homes] problem with security=share. We were still relying
on a valid vuid to get the connecting username - this is *never* true
(anymore) with security=share.
Jeremy.
-
Jeremy Allison
fc2295e0f5 Makefile, loadparm.c, server.c, smb.h, util.c: Patch from
stn@techfak.uni-kiel.de (Stefan Nehlsen) to get homes from
the NIS+ map.
smbpasswd.c: Tidy up of cli_state structure.
Jeremy.
-
Christopher R. Hertel
46445421c5 I removed a static string that was in there because I planned to do
something with it some day.  It was causing gcc to cough up warnings
(not serious ones, mind you).  Don't worry... It will be back!
Chris -)-----
-
John Terpstra
5d956abb4f Added const cast to struct args to get rid of compile time warning. -
Jeremy Allison
6ed3de7118 Removed unneeded proto symbol.
Jeremy.
-
Jeremy Allison
c92bd80742 Missed compile error when compiling with KANJI=true.
Jeremy.
-
Jeremy Allison
b6c965c396 Added codepage 936 (simplified Chineses).
In doing so I realized that much code was being
duplicated between Hangul, Big5 and Simplified
Chinese - so I re-arranged kanji.[ch] to go
through generic functions for all multibyte
characters that can be identified by a single
code range (not Kanji - but all the others).

Jeremy.
-
Jeremy Allison
838e2fe2f7 Fix to stop Windows 95 spinning on print queue requests when it
gets an error message it doesn't understand.
Jeremy.
-
Jeremy Allison
81cbfaacb1 Added check for getpwnam returning NULL.
Jeremy.
-
Luke Leighton
2245f4908e want all of data in show_msg at log levels > 50. -
Jeremy Allison
cf15b3bd74 loadparm.c: Cause IPC$ comment to be evaluated at runtime, rather than
load time (patch from "Marty Leisner" <leisner@sdsp.mc.xerox.com>.
server.c: Patch from Josef Hinteregger <joehtg@joehtg.co.at> - string
could be overwritten when find_service() called recursively.
Jeremy.
-
Jeremy Allison
e6a083451f Fix from Josef Hinteregger <joehtg@joehtg.co.at> for using
character set = iso8859-1 with the new multibyte char code.
Was always using sj_to_sj conversion in error.
Jeremy.
-
Jeremy Allison
0f4914b870 We were missing a case switch in announcement processing - we
were loggin a become backup request with debug log level of 0
- thus producing lots of annoying error messages.

Now handle this explicitly.
Jeremy.
-
Jeremy Allison
c1367bf533 Changed code to check NT password *first* - if it exists.
The NT password is a higher quality password, and should
always be looked at before the LM password, if available
(sorry, Luke, just a minor change, the other changes you
made were fine :-).
Jeremy.
-
Jeremy Allison
f9dacd1d8b Patch from Chris Maltby <chris@softway.com.au>. His comments follow:
+ improvement to smbtar to allow exclusion/inclusion of system and
    hidden files, and to generate a listing of what has been archived
    in a format useful for automated backup systems.

  + add the "Softq" spooling system to samba's printing capabilities.

  + I have "fixed" the intrusion of US style dates into samba reporting
    as well. The format yyyy/mm/dd is not only uunambiguous, but also
    has the benefit of making lexicographic sorts work correctly.

Jeremy.
-
Jeremy Allison
84d858782e Updated Eastern European translation table from dan@feld.cvut.cz.
Jeremy.
-
Luke Leighton
2c29a7d9cf cli_login.c :
start to create the calls needed for client-side of "network" logins,
	which will be used for domain version of pass-through authentication.
	unfortunately, none of this code is called in the main branch, because
	smbclient BRANCH_NTDOM code isn't in use, yet!

srv_netlog.c :

	fixed a problem with static net_login_network() which was being
	stubborn: the if() statement looked horrendous, so i split it into
	two if() statements, one to deal with the lm password; the other to
	deal with the nt password.

	the smb_password_check() functions should _not_ be called here, in
	case we decide to disable lm hashes for security reasons, just like
	nt does.

	so, we now get a response to the SAM_LOGON "network" call, but the
	connection is still dropped.  a trace is needed from an nt server,
	which is why i started on the client-side code.  see above, which
	is why i'm calling it a day :-)
-
Jeremy Allison
66affb3dc3 Rolling back machine password change code - this doesn't work (yet).
Jeremy.
-
Jeremy Allison
3b56fbc11e includes.h: Added semaphore fix for HPUX10.x
server.c trans2.c: Added oplock deadlock bug fix.
lib/rpc/server/srv_netlog.c: Made code that changes machine account password the default.
Jeremy.
-
Andrew Tridgell
f2d1e39a66 the default for old style accounts should be workstation trust
account, not server trust account.
-
Jeremy Allison
188fb28d7b Fixed compile-time error introduced by log message change.
Added support for 32bit error messages needed for NTDOM code (was
in NTDOM branch, somehow missed during the merge).
Jeremy.
-
Jeremy Allison
38391b51cd Added extra remote password changing error codes from lmerr.h on NT.
Jeremy.
-
John Terpstra
7775b0f2aa Added remote machine and address to debug message in make_connection() function.
contributor: <ado@flower.nci.nih.gov>
-
Jeremy Allison
4ac50c0f0a chgpasswd.c, ipc.c, loadparm.c: Added boolean "unix password sync"
parameter which allows the new change password code to change the
unix password also. Defaults to OFF.
includes.h: Added termios.h to FreeBSD to allow password changing.
namequery.c: Fixed missing name parameters to debug statements.
Jeremy.
-
Jeremy Allison
c9e066037a Fix for client generated core-dump bug where offset to readraw
was so large that when used with -DUSE_MMAP it caused the unsigned
subtraction to wrap aound and become positive - thus causing
a silly memcpy offset. Thanks to "Michael St. Laurent" <rowl@earthlink.net>
for giving me the core dump that allowed me to track this one
down.
Jeremy.
-
Jeremy Allison
6a3394a285 client.c: Fixed problem where debug level on command line was overridden by smb.conf.
smbpasswd.c: Removed bugs I put in yesterday (thanks Luke :-) and added error
message reporting for remote password changing.
Jeremy.
-
Jeremy Allison
a402b5070f Added the ability to differentiate between workstation and server
accounts when adding machine account types.
Jeremy.
-
Jeremy Allison
0601a41993 smbpass.c: Made unknown accounts ending in '$' server accounts, not
workstation.
smbpasswd.c: Added code to count down from last machine account
to add correct uid when adding a machine account.
Jeremy.
-
Jeremy Allison
f6bf7baebe nameconf.c is a stray .c file that shouldn't be in the
distribution. It's a left over.
Jeremy.
-
Jeremy Allison
8d686f3b6b Fix for is_in_path from "Steven Hartland" <steven_hartland@pa.press.net> -
hide files was not working.
Jeremy.
-
Christopher R. Hertel
abcc9705af Just fiddled with the README.UBI file. -
Jeremy Allison
a31aa09173 RFC1002 says we must put compressed name pointers in the following
outgoing packets :

NMB_NAME_REG_OPCODE, NMB_NAME_RELEASE_OPCODE, NMB_NAME_REFRESH_OPCODE,
NMB_NAME_MULTIHOMED_REG_OPCODE.

A WINS server written by Shadow Software was rejecting our packets
as we weren't using name pointers in those requests (talk about
picky :-).

Jeremy.
-
Jeremy Allison
607c64fadb Added writing of '[XXX]' account control bits into gcos
field when adding a user via smbpasswd.
Jeremy.
-
Jeremy Allison
c66966ff00 Updated smbpasswd to allow root to add machine accounts, and allow
root to disable users and set them to "NO PASSWORD".
Not quite finished with machine account stuff yet, but everything
compiles.
Jeremy.
-
Jeremy Allison
6eca266fe5 Fixed 'unused variable' warnings found with gcc -Wall -Werror.
Jeremy.
-
Samba Release Account
051ec104fe ypserver not available: AUTOMOUNT server and path don't work.
fix: set default values to local server / path _before_ attempting to
find the ypserver's auto.home entry.
-
Jeremy Allison
7f74970838 clientgen.c ipc.c smbpasswd.c: Fixes for warnings (from Herb).
quotas.c: Linux quota fix.
util.c: Ensure smb_read_error is zero in all calls that can set it.
lib/rpc/include/rpc_misc.h lib/rpc/include/rpc_netlogon.h
lib/rpc/parse/parse_misc.c lib/rpc/parse/parse_net.c
lib/rpc/server/srv_netlog.c : Modify Luke's code to call
SamOEMhash().

Jeremy.
-