1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-05 09:18:06 +03:00
Commit Graph

133 Commits

Author SHA1 Message Date
Jeremy Allison
6e995802fe clitar.c: Fixed gcc warning with comment in /* */ code.
nmbd_winsserver.c: Remember to free packet in multi-homed register code.
                   Use correct query_name_from_wins_server call instead of
                   query_name call in multihomed code.
Jeremy.
0001-01-01 00:00:00 +00:00
Richard Sharpe
c749c8d046 Arrrgh, one more fix. Restores of long file names were
broken ...

Added a bzero of the buffer the names went into ...

Seems OK now ...

Richard Sharpe
0001-01-01 00:00:00 +00:00
Richard Sharpe
dc9436bae4 Remove the copyright to Canon Information Systems Australia, as we don't
want them to have the copyright.

Added a new DOSERR response code that Win95 returns, unimp, unimplemented.

Added code to ignore errors on setting remote time, as Win 95 does not like
the time being changed on a directory.  Win NT and Samba are OK at this.

This is the next to last clean-ups here. Next is to properly handle restore
times on directories (except for Win95--see above).

Now have Jay's changes in and have fixed a bug reported by Tim Lee.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e65efe3f78 clitar.c: Fixed minor gcc -pedantic-error compile warnings.
passdb.c: Fixed stupid bug in read_sid_from_file().
Jeremy.
0001-01-01 00:00:00 +00:00
Richard Sharpe
daf239a188 Re-submit changes for CLITAR.
Have fixed the location of create_string_s back to clitar.c, and have
added Jay Berkenbilt's changes.

Have used safe_strcpy and safe_strcat everywhere and have tested with
long file names extensively, but have not yet been able to check that
it works OK on Solaris.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d23b443225 clientgen: Added USE_SSL for client shutdown.
clitar.c: Added 'Samba style' comments before string_create_s().
loadparm.c: Fixed missing comma in SSL code.
util.c: Removed string_create_s(). Currently it's only called from
        clitar.c and having it here as well as a static in clitar
        causes the compile to break (Richard, please decide where
        you want this function).
lib/rpc/parse/parse_net.c: Fix from <anders.blomdell@control.lth.se>
                           to stop coredump on missing parameter.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
31e768369f Added SSL support from Christian Starkjohann <cs@obdev.at>
This patch may not yet compile with -DUSE_SSL enabled, further
Makefile changes may be needed. But it was important to get
this code in place before I go off to USENIX.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
8216363e83 client.c: Made -L do a null-session share unless -U user is specified.
clientutil.c: Fixed NT session to add NT password.
groupname.c: Added lookup function.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
21ca6bfb3b Makefile:
smbumount.c: Added fixes to compile under Linux.
includes.h: Added SunOS 4.x QSORT_CAST fix.
reply.c: Fixed user name mapping function for security=server, security=domain.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
ae3510e9fb client.c: Allowed client to proceed even if it gets error 234 (more data
available) when scanning server/workgroup/share lists.
ipc.c: Removed redundent definition of ERROR_MORE_DATA (234) we already have
       ERRmoredata in smb.h
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
34f40474ab clientutil.c: Don't core dump if no controlling terminal available for password.
passdb.c:
lib/rpc/include/rpc_misc.h: First cut at automatic uid/gid to rid mapping.
We can change this at a later date to make more bits available if neccessary.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
f257d2e4ba includes.h: SunOS doesn't have strcasecmp, solaris versions prior to 2.6 don't
have vsnprintf.
locking_slow.c: slight tidy.
make_smbcodepage.c: Use safe_strcpy instead of pstrcpy.
nmbd_winsserver.c: Use pstrcpy instead of fstrcpy.
smbmount.c: Fixed reported bug.
util.c: Removed old fstrcpy/fstrcat functions.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
2d77445400 This is a security audit change of the main source.
It removed all ocurrences of the following functions :

sprintf
strcpy
strcat

The replacements are slprintf, safe_strcpy and safe_strcat.

It should not be possible to use code in Samba that uses
sprintf, strcpy or strcat, only the safe_equivalents.

Once Andrew has fixed the slprintf implementation then
this code will be moved back to the 1.9.18 code stream.

Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
1386c6e25a don't use system functions as arguments to qsort() as otherwise you
get stuck on systems with broken headers (like SunOS4). In this case
use StrCaseCmp instead of strcasecmp
0001-01-01 00:00:00 +00:00
Andrew Tridgell
ee09e9dadb changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.

This should prevent any sprintf based security holes.
0001-01-01 00:00:00 +00:00
Jeremy Allison
61c1dbb978 clitar.c: #ifdef'ed out all the bits that were giving 'defined but not used'
messages.
nttrans.c: More updates.
smb.h: Removed stuff that didn't belong in the smb_passwd struct. Persuaded Luke
       to use a new structure.
web/swat.c: Fixed gcc complaints about shadowing global 'string'.
Jeremy.
0001-01-01 00:00:00 +00:00
Richard Sharpe
7b98fd5b69 Se-submitting clitar.c/
I now only have one warning in my code which is the result of some code I have started
working on but am not yet using in the code, along with a warning that is caused
by one of the include files (a nested comment).

I used -Wall -Wshadow -Wstrict-prototypes
0001-01-01 00:00:00 +00:00
Jeremy Allison
18a0a10dcb Rolling back again to the equivalent of revision 1.22, as the current
CVS head branch will not compile.
Jeremy.
0001-01-01 00:00:00 +00:00
Richard Sharpe
47eb7e5be2 Real fix for clitar.c problems. Have now made all the right
things static, and have done a 'make proto; make clean; make'.

Still get 54 compiler warnings under Digital UNIX cc.

Honest. :-)
0001-01-01 00:00:00 +00:00
Jeremy Allison
50f75b1146 Rolling clitar.c back to the previous rev 1.22 as the current one
needs fixing (sorry).
Jeremy.
0001-01-01 00:00:00 +00:00
Richard Sharpe
fc0cad9035 Added bug fixes to clitar to ensure proper longfile name restores
occur.

Also getting ready for setting directory dates correctly
0001-01-01 00:00:00 +00:00
Jeremy Allison
866406bfe3 This looks like a big change but really isn't.
It is changing the global variables "myname" and "myworkgroup"
to "global_myname" and "global_myworkgroup" respectively.

This is to make it very explicit when we are messing
with a global (don't ask - it makes the domain client
code much clearer :-).

Jeremy.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
20770b6f1c Adding the same changes to HEAD as were added to BRANCH_1_9_18.
Changed smbpasswd to be client-server for a normal user, rather
than accessing the private/smbpasswd file directly (it still accesses
this file directly when run as root, so root can add users/change a
users password without knowing the old password).

A shakeout of this change is that smbpasswd can now be used to
change a users password on a remote NT machine (yep - you heard
that one right - we can now change a NT password from UNIX !!!!!).

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
7f118970da Adding the same change as was added to 1.9.18 branch to add the
"name resolve order" parameter.

source/Makefile: Re-ordered link for name resolve order code.
source/clientgen.c:
source/clientutil.c: Added calls to resolve_name().
source/includes.h: Added HPUX zombie fix.
source/loadparm.c: Added new name resolve order parameter.
source/namequery.c: Re-wrote to include parsing of lmhosts file, new resolve_name()
                    function requested by John.
source/nmbd.c: Tell resolve_name not to do WINS lookups if we are the WINS server.
source/nmbd_lmhosts.c: Call lmhosts parsing functions in namequery.c
source/password.c: Call resolve_name() to lookup security=server name.

source/reply.c:
source/time.c:
source/trans2.c: "fake directory create times" fix from Jim Hague - hague@research.canon.com.au.
source/util.c: Removed isalnum() test in Get_Hostname() that seems to cause
               problems on many systems.

Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
f9af35da26 another makeover of loadparm to support new stuff in swat and
testparm.

In particular I added:

- ability to optionally save default values of all parameters when
  calling lp_load(). This can then be used to save only non-default
  parameters in lp_dump(). This makes the saved smb.conf (and viewed
  parameters in testparm) much shorter

- ability to not load ipc share in lp_load()

- separators in parm_table[] so parameters can be grouped logically.

- flag to mark parameters that are local but which should be also
  viewed as global as far as parameters editing is concerned
0001-01-01 00:00:00 +00:00
Jeremy Allison
118ba4d77a "For I have laboured mightily on Luke's code, and hath broken
all I saw" - the book of Jeremy, chapter 1 :-).

So here is the mega-merge of the NTDOM branch server code.
It doesn't include the new client side pieces, we'll look
at that later.

This should give the same functionality, server wise, as
the NTDOM branch does, only merged into the main branch.

Any fixes to domain controler functionality should be
added to the main branch, not the NTDOM branch.

This code compiles without warnings on gcc2.8, but will
need further testing before we are sure all the working
functionality of the NTDOM server branch has been
correctly carried over.

I hereby declare the server side of the NTDOM branch
dead (and all who sail in her :-).

Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
299016338c Change the multibyte character set support so that
Kanji support is one case of multibyte character
support, rather than being a specific case in
single byte character support.

This allows us to add Big5 Chinese support (code page 950)
and Korean Hangul support (code page 949) at very little
cost. Also allows us to easily add future multibyte
code pages.

Makefile: Added codepages 949, 950 as we now support more multibyte
codepages.
asyncdns.c: Fixed problem with child being re-spawned when parent killed.
charcnv.c
charset.c
client.c
clitar.c
kanji.c
kanji.h
smb.h
util.c
loadparm.c: Generic multibyte codepage support (adding Big5 Chinese
            and Korean Hangul).
nmbd.c: Fixed problem with child being re-spawned when parent killed.
mangle.c: Modified str_checksum so that first 15 characters have more
          effect on outcome. This helps with short name mangling as
          most 'long' names are still shorter than 15 chars (bug was
          foobar_mng and foobar_sum would hash to the same value, with
          the modified code they hash differently.
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
140fba461b -N option still prompted for password in smbclient -L usage 0001-01-01 00:00:00 +00:00
Jeremy Allison
1da47e79d3 Sometime after 1.9.17p5 smbclient stopped being able to do
NetBIOS name lookups by broadcast and instead only does DNS.
With the belief that this was not what was intended (I think
it happened in the clientutil.c cleanup) I have added that
capability back to smbclient by adding the #define USENMB
into clientutil.c, and adding the required namequery.o into
the object lists for smbclient and smbmount (as they now
need it to link).
If this was done intentionally let me know and I'll back
this out.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
735adfa01b Fix for crash bug with amanda - from "Michael C. Povel" <Michael.Povel@hub.de>.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
7123405d63 Added fix for doing pq command (from "James J. Szinger" <james.szinger@yale.edu>).
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
b9c1697723 This is *not* a big change (although it looks like one).
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
0001-01-01 00:00:00 +00:00
Volker Lendecke
1e1b0c80f8 *** empty log message *** 0001-01-01 00:00:00 +00:00
Jeremy Allison
6040d7a39e Makefile: Added new codepage - 866.
charset.c: Supporting code for codepage 866.
clientutil.c: Fix compile bug in little-used #define.
includes.h: Supporting code for codepage 866.
make_smbcodepage.c: Supporting code for codepage 866.
pcap.c: Fix bug for lpstat.
Jeremy.
0001-01-01 00:00:00 +00:00
Volker Lendecke
2d550d28cd Added manpages.
Removed obsolete options from smbmount help message.
Volker
0001-01-01 00:00:00 +00:00
Volker Lendecke
65406a546e the real source code for the smbfs utilities. Forgot to do
cvs add first.
Volker
0001-01-01 00:00:00 +00:00
Volker Lendecke
ccbbc4e647 Added 3 commands:
smbmount: This is a stripped down smbclient that communicates with
the Linux 2.1.x kernel to supply authenticated smb connections for
smbfs mount points.
smbmnt/smbumount: setuid commands that do the actual smb mount system
call after having done the appropriate security checks
0001-01-01 00:00:00 +00:00
Jeremy Allison
7cb4e4b099 Bugfix from Branko Cibej <branko.cibej@hermes.si>
- client.c had a workaround embedded in it for his
earlier bug in StrnCaseCmp - removed this.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
1084fb4682 client.c:
clientgen.c:
clientutil.c:
clitar.c: Changed usage of receive_smb to new function client_receive_smb
          except for one use of receive_smb in client.c. This is the
          receive_smb used to discard packets received whilst in a
          keyboard wait state.
util.c: Created new function client_receive_smb that ignores session
        keepalives just as the old receive_smb used to do. Created
        internal function read_smb_length_return_keepalive that is
        used internally by the changed receive_smb call.
        Changed read_smb_len to not use an internal buffer - it is
        never called with a null buffer so such code is redundant.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
95ad2c284d fix a bug that sometimes prevented smbclient from connecting with
protocol < LANMAN1
0001-01-01 00:00:00 +00:00
Jeremy Allison
d80b0cb645 This is it ! The mega-merge of the JRA_NMBD_REWRITE branch
back into the main tree.
For the cvs logs of all the files starting nmbd_*.c, look
in the JRA_NMBD_REWRITE branch. That branch has now been
discontinued.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
c779ed654e fixed the help message for -p (someone complained!) 0001-01-01 00:00:00 +00:00
Andrew Tridgell
8ced76c4c7 get rid of stat command (it is a hangover from an old experiment) 0001-01-01 00:00:00 +00:00
Andrew Tridgell
bac6b0daa2 added true enumerated types in loadparm.c. Now we don't need all those
"interpret_security" and similar functions. This also means that
testparm produces string values for these enumerated types rather than
an integer. This was done to make the web interface much cleaner.

While I was doing this I found a couple of very nasty bugs in the
parm_table code. Someone had added a handle_character_set() function
that treated the char** pointer for a P_STRING as an integer! This
would have caused memory corruption for anyone using the "character
set" option. The loadparm code is delicate - please be careful about
using it's more esoteric features!

I've also removed the "coding system" global and made it a
P_STRING. The integer value was never used anywhere in Samba.
0001-01-01 00:00:00 +00:00
Jeremy Allison
4a36ac236c Rolled back tree state to 11:59pm 8th November 1997 EST to
remove problems.
Jeremy
0001-01-01 00:00:00 +00:00
Luke Leighton
ad43183d2d byteorder.h :
typecasting for the debug messages of the data dump.  hm.

#ifdef NTDOMAIN

ntclient.c rpc_pipes/lsaparse.c rpc_pipes/ntclientnet.c rpc_pipes/smbparse.c :

	adding "Net Server Password Set" functionality to smbclient.

#endif
0001-01-01 00:00:00 +00:00