1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

490 Commits

Author SHA1 Message Date
Andrew Tridgell
83bd929883 a prootype program for querying/setting a security decsriptor on a
remote machine

it is by no means complete, expect more commits soon
(This used to be commit f2f9859b70)
2000-12-03 02:19:27 +00:00
Andrew Tridgell
08036f0f3d support smbcontrol sending messages to itself (for testing purposes)
(This used to be commit 5dfae86dab)
2000-11-17 01:20:03 +00:00
Jeremy Allison
cdac09614e Fix for a problem with the new messaging system. If a sender is using the
messaging system as a notification mechanism, and the speed of notification
greatly exceeds the speed of message recovery, then you get a massively (>75Mb)
growing tdb. If the message is a simple notification, then the message is
static, and you only need one of them in transit to a target process at
any one time.
This patch adds a BOOL "allow_duplicates" to the message_send_XX primitives.
If set to False, then before sending a message the sender checks the existing
message queue for a target pid for a duplicate of this message, and doesn't
add to it if one already exists.
Also added code into msgtest.c to test this.
Jeremy.
(This used to be commit 3aa7995660)
2000-11-16 21:38:24 +00:00
Jeremy Allison
6f58dd5871 Ok - fixed a bug in our levelII oplock code. We need to break a level II on
a byte range lock (write lock only, but Win2k breaks on read lock also so I
do the same) - if you think about why, this is obvious. Also fixed our client
code to do level II oplocks, if requested, and fixed the code where we would
assume the client wanted level II if it advertised itself as being level II
capable - it may not want that.
Jeremy.
(This used to be commit 213cd0b519)
2000-11-16 00:59:18 +00:00
Gerald Carter
9fede0dc0d Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
(This used to be commit 0b92d0838e)
2000-11-13 23:03:34 +00:00
Jeremy Allison
20838bb9ed Merge of Herb's profiling code.
Jeremy.
(This used to be commit 3be056c71a)
2000-11-11 00:33:33 +00:00
Jeremy Allison
c97023b14c Merge in Herb's changes from 2.2.
Jeremy.
(This used to be commit 24d76c5fbd)
2000-11-10 22:07:57 +00:00
Herb Lewis
53ce2f7012 lib/messages.c add debug print for receipt of PING and
REQ_DEBUGLEVEL messages
utils/smbcontrol.c      allow "q" to exit interactive mode. Exit on error
                        from message_init.
(This used to be commit cda8c04391)
2000-10-12 17:58:40 +00:00
Herb Lewis
ca4acd520e print source PID in PONG and debuglevel message. Allow request debuglevel
message to go to any dest. Put timeout for commands that expect a reply.

sync with 2.2 branch
(This used to be commit 45632bb813)
2000-10-12 00:29:01 +00:00
Christopher R. Hertel
2cddf134e6 Simple cleanup, but I also changed the value of the dlevel parameter passed
to open_socket_in() from within the open_sockets() function.  This has some
effect on the way port numbers are assigned.  Basically, if we use the -r
switch we are saying 'use port 137'.  If we can't do that, there should
be an error message and a failure.  If we don't use -r then we simply select
the first available port.  The way it was working, if we selected -r and
port 137 was in use, wierd things would happen as open_socket_in() tried to
find another port.
(This used to be commit f09cb41ad8)
2000-10-11 16:24:20 +00:00
Herb Lewis
8719c27726 changes to sync with 2.2. tree
.cvsignore              remove config.h - not in this directory
include/profile.h       profile changes
lib/messages.c          added message to return debug level
libsmb/clierror.c       cast to get rid of compiler warning
libsmb/smbencrypt.c     cast to get rid of compiler warning
profile/profile.c       add flush profile stats changes for profile struct
rpc_parse/parse_samr.c  fix for compiler warning
rpc_server/srv_samr.c   cast to get rid of compiler warning
smbd/ipc.c              profile stats
message.c               profile stats
smbd/negprot.c          profile stats
smbd/nttrans.c          profile stats
smbd/trans2.c           profile stats
utils/smbcontrol.c      new flush stats command
(This used to be commit bbb24daa25)
2000-10-11 05:31:39 +00:00
Andrew Tridgell
d2f07bb765 don't use gets() !
(This used to be commit e4ea0a5975)
2000-10-10 05:05:35 +00:00
Jeremy Allison
74d4a3b741 Added Herb's fixes to HEAD.
Jeremy.
(This used to be commit 4862d2ab11)
2000-10-06 23:01:47 +00:00
Jeremy Allison
641d9223d2 utils/smbcontrol.c: Fixes from Herb for interactive use.
printing/nt_printing.c: No C++ comments please :-).
Jeremy.
(This used to be commit dd9f668108)
2000-09-29 20:08:00 +00:00
Andrew Tridgell
e600c12b6b use the 64 bit locking interface in locktest
(This used to be commit 1ece7f1ffd)
2000-09-29 04:43:07 +00:00
Luke Leighton
dda54bcd7d added NEGNOWAIT. sent to secure@microsoft.com
(This used to be commit b211793318)
2000-09-26 05:44:42 +00:00
Andrew Tridgell
7be9a4fd4c first cut at smbcontrol program. It currently allows syntax like:
smbcontrol nmbd debug 7
  smbcontrol smbd debug 9
  smbcontrol 3278 debug 1
  smbcontrol nmbd force-election
(This used to be commit 5f91c24636)
2000-09-13 07:07:17 +00:00
Andrew Tridgell
df89b48539 - fixed some memory leaks in the messages code
- added a MSG_PING message for performance testing.
(This used to be commit e779f834db)
2000-09-12 06:57:25 +00:00
Andrew Tridgell
f0ce4f7ae3 - changed the msg_type to be an int instead of an enum so that it is
easier to add new message types to messages.h without breaking old
binaries

- added a MSG_FORCE_ELECTION message to force nmbd to hold an election
(This used to be commit f1c49ca7ce)
2000-09-12 06:13:25 +00:00
Andrew Tridgell
fe47e8efe2 a simple test program I use to test the debug message system
(This used to be commit db1ec05f89)
2000-09-11 07:03:10 +00:00
Jeremy Allison
d8ad8a0d74 Fix for safe_free freeing static strings. From Robert August Vincent, II.
Jeremy.
(This used to be commit bd844fcd30)
2000-08-21 19:30:19 +00:00
Andrew Tridgell
0d7df3ee01 fixed help string
(This used to be commit 16afa46797)
2000-08-09 00:11:01 +00:00
Tim Potter
18db0514fd Fixed memory leaks in root and non-root password changing.
(This used to be commit f3a4f81a5e)
2000-07-26 03:55:17 +00:00
Christopher R. Hertel
ac56d8f848 Removed the sanity check on the WINS SERVER parameter because it simply
checked to see that only one server was listed.  As I am working on an
enhancement that allows multiple servers to be listed...this was a bit
contrary.  ;)
(This used to be commit 1b718f6767)
2000-07-18 20:15:15 +00:00
Andrew Tridgell
c1254449a2 the smbw sample prog
(This used to be commit 0afcc0d336)
2000-07-06 03:54:07 +00:00
Andrew Tridgell
7d9b43c8e0 slightly saner defaults
(This used to be commit fae3acc574)
2000-06-29 08:22:00 +00:00
Andrew Tridgell
b41b1daa36 add -d debuglevel option
(This used to be commit 448f21325f)
2000-06-15 09:31:34 +00:00
Christopher R. Hertel
30fdd204f4 If I use nmblookup to search for node ZOOB#1B and there is no such name
registered within the search space, nmblookup would report

  name_query failed to find name ZOOB

I've changed it to report any non-zero type, so the above message becomes

  name_query failed to find name ZOOB#1B

If the query is for ZOOB or even ZOOB#00 then the old style error message
is given.

Chris -)-----
(This used to be commit 5ecf0c6171)
2000-06-13 20:41:15 +00:00
Andrew Tridgell
cf868f3296 argv parsing fixes
(This used to be commit 502751cc62)
2000-06-13 15:47:44 +00:00
Andrew Tridgell
e281246010 allow for lots of connections per server
(This used to be commit 4bbc218922)
2000-06-13 15:47:23 +00:00
Andrew Tridgell
ec33db96d5 added -L switch to tell smbtorture to use oplocks
(This used to be commit 73033d0803)
2000-06-13 09:33:43 +00:00
Andrew Tridgell
8843a6379d Linux kernel oplocks now seem to work, but need a _lot_ of testing
I had to modify sys_select() to not loop on EINTR. I added a wrapper
called sys_select_intr() which gives the old behaviour.
(This used to be commit b28cc4163b)
2000-06-11 05:57:58 +00:00
Andrew Tridgell
2db93dcc0f don't ue nasty /proc/locks hack by default
(This used to be commit 62d72dd67b)
2000-06-05 13:54:26 +00:00
Andrew Tridgell
7df31cb494 added locktest2
this uses 16 open file descriptors on 2 servers, with each server
accessed both via POSIX call and SMB calls. The idea is to test
NFS/SMB locking interaction.

Unfortunately the NT NFS locking implementation is so badly broken
that we don't have anything to test against
(This used to be commit 581498fe6b)
2000-06-05 13:53:56 +00:00
Andrew Tridgell
92972280af added -O (use oplocks) option to locktest
(This used to be commit 56ba49382f)
2000-06-05 09:40:58 +00:00
Andrew Tridgell
cbeb0aa3f2 moved secrets fns into secrets.c
(This used to be commit 16355a9c66)
2000-06-03 06:34:40 +00:00
Andrew Tridgell
a0e1930489 fixed bugs in fdpass tests
(This used to be commit ee4f6335ad)
2000-05-27 00:29:10 +00:00
Andrew Tridgell
fae1164304 move srandom to after connect so random stuff in clientgen doesn't
change seed
(This used to be commit d9322d01e0)
2000-05-27 00:28:02 +00:00
Andrew Tridgell
d29f8af77b minor fixes
(This used to be commit 4d00314ec5)
2000-05-24 21:11:34 +00:00
Luke Leighton
0fca9817b1 2nd evil simultaneous read-write test. forks. one writer. others
are readers.  writes between 1 and 20 bytes.  reads as much as possible.
compares.  repeat until end of buffer (fixed size: 131072 bytes) reached.
(This used to be commit 26f51a7abb)
2000-05-24 07:29:45 +00:00
Andrew Tridgell
d87a20e8c5 we don't do "revalidate = yes" any more
(This used to be commit 289d3cac38)
2000-05-24 07:18:34 +00:00
Andrew Tridgell
9514925481 added -u hide_unlock_fails option
(This used to be commit fc8c460a61)
2000-05-24 07:15:54 +00:00
Andrew Tridgell
aabf523caf use \\ in front of filenames
(This used to be commit a92f8c8620)
2000-05-24 06:01:05 +00:00
Andrew Tridgell
c29b72cd4f use lp_workgroup()
use \\ in front of filenames
get short name via a separate trans2 level 260 call
(This used to be commit 5fd4dbf72e)
2000-05-24 05:56:34 +00:00
Andrew Tridgell
7fd62a26f7 use lp_workgroup()
use \\ in front of filenames
(This used to be commit 9c64f47c16)
2000-05-24 05:47:08 +00:00
Luke Leighton
fb66b3b6e6 torture test:
same cli_state:
open file rw/denynone, open *same* file r/denynone.
write to file (fd1) read from file (fd2).  compare.  repeat.

two cli_states:
open file rw/denynone (cli1), open *same* file r/denynone (cli2).
write to file (fd1) read from file (fd2).  compare.  repeat.
(This used to be commit 0a993f3783)
2000-05-24 05:40:03 +00:00
Tim Potter
6c52c1a5c7 Added -W workgroup command line option.
Added call to codepage_initialise().
(This used to be commit fcb8e2fbe2)
2000-05-22 23:38:56 +00:00
Andrew Tridgell
2958dfcdf8 added secrets.tdb and changed storage of trust account password to use
it
(This used to be commit 88ad00b82a)
2000-05-08 10:42:21 +00:00
Andrew Tridgell
5612f6a2aa signed/unsigned fixes so we can handle a lock base close to 2^32
(This used to be commit 0ce2ca5ccd)
2000-05-06 01:36:59 +00:00
Andrew Tridgell
044b569006 make debug easier to read
(This used to be commit c14a261644)
2000-05-05 01:26:52 +00:00
Andrew Tridgell
8ea45ac5ce make debug easier to read
(This used to be commit d64bb07f0a)
2000-05-05 01:20:25 +00:00
Andrew Tridgell
a6280d37c6 nasty hack to print posix locks
(This used to be commit efc9752f1e)
2000-05-05 01:11:23 +00:00
Andrew Tridgell
c7845863bb example of broken posix lock behaviour
(This used to be commit b3999f3b20)
2000-05-05 00:46:38 +00:00
Jeremy Allison
045469493c rpc_server/srv_lsa.c: Bring into sync with 2.0.x.
rpc_server/srv_pipe_hnd.c: Bring into sync with 2.0.x.
smbd/blocking.c: Improve blocking debug reporting.
utils/torture.c: Added check for NT locking bug.
Jeremy.
(This used to be commit e8ff6d3fb5)
2000-05-04 21:57:28 +00:00
Andrew Tridgell
f74ea2b78b parameterize the lock timeout
(This used to be commit 98ad4095cc)
2000-05-04 09:32:21 +00:00
Andrew Tridgell
0236a14bac added a test for the NT byte range lock into smbtorture
(This used to be commit 7cfd45cc56)
2000-05-04 09:31:57 +00:00
Andrew Tridgell
420d7e02dc an even simpler example of NT gettings its locking code wrong. This
one doesn't even need two connections to the box, just two file handles.

it is a very simple case actually, and one I think will happen quite a
lot in real life. I wonder how they haven't noticed it? I checked and
W2K has the same bug.
(This used to be commit 0b335e4158)
2000-05-04 08:58:07 +00:00
Andrew Tridgell
a7820eb9af need LOCKING_OBJ in locktest now
(This used to be commit 89e7199445)
2000-05-04 06:57:26 +00:00
Andrew Tridgell
876dd8d9aa more locktest improvements
the current preset tests show a very interesting NT bug - it sometimes
refuses a lock that it shouldn't.
(This used to be commit 85b5dc64cf)
2000-05-04 06:30:17 +00:00
Andrew Tridgell
9faf18a4b0 fixed message text
(This used to be commit 99e522023e)
2000-05-04 06:29:13 +00:00
Andrew Tridgell
a5da647e10 added -A analyze mode to locktest - it can now automatically prune
the list of locks that cause a failure
(This used to be commit 0beee59432)
2000-05-04 04:14:23 +00:00
Andrew Tridgell
e6bc1dd64d found a much simpler case that kills the posix locking
(This used to be commit b703cecf81)
2000-05-04 02:12:33 +00:00
Andrew Tridgell
1246072d99 fixed a uninit memory read that insure found
(This used to be commit 43fe5b98b4)
2000-05-04 02:01:48 +00:00
Andrew Tridgell
82e6018ad8 added ability to present lock tests
(This used to be commit 3fc6a467fc)
2000-05-04 01:40:51 +00:00
Andrew Tridgell
380d02c219 improved the lock test program
(This used to be commit a0a3931c6e)
2000-05-03 14:49:15 +00:00
Andrew Tridgell
1d3d724dd1 added a nasty lock testing program
it opens 2 connections to each of 2 servers, and opens 2 fnums on the
same file on each connection (a total of 8 file descriptors)

then it does random lock/unlock/reopen requests in a 100 byte range on
the file and compares the results from the 2 servers.

strangely enough, NT fails this test against itself right now - I'm
still trying to figure that out.
(This used to be commit 2f14d7c9bc)
2000-05-03 13:54:28 +00:00
Jeremy Allison
37a6e44ad8 Added read overlay write lock on same fnum test to locktest2.
Added locktest5 for locking stacks.
Jeremy.
(This used to be commit 65399ae1f0)
2000-05-03 02:24:56 +00:00
Jeremy Allison
830a9e571e locking/posix.c: Fixed double-free nasty crash bug found by insure.
utils/make_smbcodepage.c:
utils/make_unicodemap.c: Insure 'make install' fixes.
Jeremy.
(This used to be commit 3b25f7368b)
2000-05-01 19:43:50 +00:00
Andrew Tridgell
481ca7c67c handle the special rule of *.* for old style listings when old_list is
true
(This used to be commit cdf4c4c812)
2000-04-30 14:37:57 +00:00
Andrew Tridgell
23c0cb01ca added cli_list_old() to allow for old style directory listing from
masktest
(This used to be commit 8a5c8cfa0e)
2000-04-30 12:34:26 +00:00
Andrew Tridgell
3727e4aaac changed masktest to test the internal algorithm against one server,
rather than 2 servers
(This used to be commit 0e63b4b363)
2000-04-30 11:11:19 +00:00
Andrew Tridgell
71e7974f3f YIPEE!!!!!
We finally have a perfect emulation of Microsoft wildcard
matching. The routine ms_fnmatch() does wildcard matching with all MS
wildcards (including the unicode wildcards), and masktest against a
NT4 workstation with hundreds of thousands of random exmaples has not
found a single error.

amazingly it is only about 60 lines of code, but it has taken us years
to get it right. I didn't sleep much last night :)
(This used to be commit cc9e007cdf)
2000-04-30 04:45:16 +00:00
Jeremy Allison
36db78feda Fixed subtle unlocking bug when a file is closed. We need to store the
smbpid used when a file was opened in the files_struct. Else we use
the wrong global_smbpid when we are closing the file and trying to
remove the brl locks - this causes the brl locks to be left when the
file is closed as the samba_context check fails.
Jeremy.
(This used to be commit 2746e5602e)
2000-04-27 22:23:04 +00:00
Andrew Tridgell
65ec80c51d quick hack to get smbtorture working again
(This used to be commit 2d37c1f98f)
2000-04-27 07:36:06 +00:00
Andrew Tridgell
59c8a608c2 fixed a memory leak in nmblookup
(This used to be commit 49865ea06c)
2000-04-25 00:46:46 +00:00
Andrew Tridgell
da2da10117 load smb.conf and interfaces in masktest (to allow for netbios name
resolution)
(This used to be commit f007531742)
2000-03-26 09:20:47 +00:00
Jeremy Allison
08607c3e0c Fixed parsing issue with HP printer defs reported by HP.
Jeremy.
(This used to be commit 035272e6bc)
2000-03-14 22:04:35 +00:00
Luke Leighton
3958c39106 added a tcon test: make two tconXs with the same user/pass, open a file
with one of them and try to write to the file with the other.
(This used to be commit f8d3ce0419)
2000-03-07 21:55:42 +00:00
Jeremy Allison
50444a0b5f Fixed smbpasswd crash bugs found by Giulio.
Jeremy.
(This used to be commit 54440428e5)
2000-03-01 18:58:50 +00:00
Jeremy Allison
0f1eee5c7a client/client.c:
libsmb/clientgen.c: Fixes for Win2k smbclient browsing.
Other fixes implement smbpasswd -x user to delete users. Also allows swat
to do the same.
Jeremy.
(This used to be commit 9f6ad04676)
2000-02-25 22:25:25 +00:00
Jeremy Allison
3cf31a194f Added replacement functions sys_popen and sys_pclose. These are based
on the glibc source code and are safer than the traditional popen as
they don't use a shell to exec the requested command. Now we have
these functions they can be tightened up (environment etc.) as required
to make a safe popen. It should now be safe to add the environement
variable loading code to loadparm.c
Jeremy.
(This used to be commit b52e92b09d)
2000-02-15 19:36:47 +00:00
Andrew Tridgell
dacbb15e9f the beginnings of a fnmatch() based wildcard matching routine
(This used to be commit ef256de9d9)
2000-02-10 13:43:59 +00:00
Andrew Tridgell
94d68eb808 update masktest for new make_nmb_name() syntax
(This used to be commit 3609e835d4)
2000-02-09 14:17:12 +00:00
Andrew Tridgell
74f0d16da4 added masktest to head branch, in preparation for another assault on
the wildcard handling code
(This used to be commit 3f77690dad)
2000-02-09 14:10:08 +00:00
Luke Leighton
bbe275e95b 1) added void* state argument to tdb_traverse. guess what! there were
two places i found where it was appropriate to _use_ that third argument,
in locking.c and brlock.c!  there was a static traverse_function and
i removed the static variable, typecast it to a void*, passed it to
tdb_traverse and re-cast it back to the traverse_function inside the
tdb_traverse function.  this makes the use of tdb_traverse() reentrant,
which is never going to happen, i know, i just don't like to see
statics lying about when there's no need for them.

as i had to do in samba-tng, all uses of tdb_traverse modified to take
the new void* state argument.

2) disabled rpcclient: referring people to use SAMBA_TNG rpcclient.
i don't know how the other samba team members would react if i deleted
rpcclient from cvs main.  damn, that code's so old, it's unreal.
20 rpcclient commands, instead of about 70 in SAMBA_TNG.
(This used to be commit 49d7f0afbc)
2000-02-04 04:59:31 +00:00
Andrew Tridgell
6389b81f9d renamed DENY to DENY1
added DENY2 test that checks all 648 deny combinations for the case
of two opens on the same connection
(This used to be commit 01d4c4784d)
2000-01-16 12:28:43 +00:00
Andrew Tridgell
b09e4c370e use GET_DENY_MODE() macro
(This used to be commit d9c3e0e61f)
2000-01-16 12:27:20 +00:00
Andrew Tridgell
54e1176ba1 added code to allow traversal of the byte range lock database
this is used with "smbstatus -B" to dump the lock list
(This used to be commit 5f02262914)
2000-01-16 11:14:44 +00:00
Andrew Tridgell
1359195c50 casts and defines to make solaris happy
(This used to be commit 77cf152c02)
2000-01-14 08:33:20 +00:00
Andrew Tridgell
82af221e4a we now pass all byte range locking tests
the last piece was to use a smb timeout slightly larger than the
locking timeout in bloking locks to prevent a race
(This used to be commit 1b54cb4a33)
2000-01-14 04:32:57 +00:00
Andrew Tridgell
2afd5d5eb5 some more work on the byte range locking
note the ugly global_smbpid - I hope that won't bethere for long, I
just didn't want to do two lots of major surgery at the one time.
Using global_smbpid avoids the big change of getting rid of our
inbuf/outbuf interface to reply routines. I'll do that once the
locking stuff passes all tests.
(This used to be commit f8bebf91ab)
2000-01-14 00:50:48 +00:00
Andrew Tridgell
cdb8c99fce greatly expanded the lock4 locking test. we now pass all but one test
- that should be fixed soon.
(This used to be commit 23bb936e1f)
2000-01-13 12:11:30 +00:00
Andrew Tridgell
0af00edf67 I'm currently designing a new locking system (using a tdb database!)
that will make us match NT semantics exactly and do away with the
horrible fd multiplexing in smbd.

this is some diag stuff to get me started.

- added the ability to do read or write locks in clientgen.c

- added a LOCK4 test to smbtorture. This produces a report on the server
and its locking capabilities. For example, NT4 gives this:

the same process cannot set overlapping write locks
the same process can set overlapping read locks
a different connection cannot set overlapping write locks
a different connection can set overlapping read locks
a different pid cannot set overlapping write locks
a different pid can set overlapping read locks
the same process can set the same read lock twice
the same process cannot set the same write lock twice
the same process cannot override a read lock with a write lock
the same process can override a write lock with a read lock
a different pid cannot override a write lock with a read lock
the same process cannot coalesce read locks
this server does strict write locking
this server does strict read locking


whereas Samba currently gives this:

the same process can set overlapping write locks
the same process can set overlapping read locks
a different connection cannot set overlapping write locks
a different connection can set overlapping read locks
a different pid can set overlapping write locks
a different pid can set overlapping read locks
the same process can set the same read lock twice
the same process can set the same write lock twice
the same process can override a read lock with a write lock
the same process can override a write lock with a read lock
a different pid can override a write lock with a read lock
the same process can coalesce read locks
this server does strict write locking
this server does strict read locking


win95 gives this - I don't understand why!

the same process cannot set overlapping write locks
the same process cannot set overlapping read locks
a different connection cannot set overlapping write locks
a different connection cannot set overlapping read locks
a different pid cannot set overlapping write locks
a different pid cannot set overlapping read locks
the same process cannot set the same read lock twice
the same process cannot set the same write lock twice
the same process cannot override a read lock with a write lock
the same process cannot override a write lock with a read lock
a different pid cannot override a write lock with a read lock
the same process cannot coalesce read locks
this server does strict write locking
this server does strict read locking
(This used to be commit 49637936b6)
2000-01-10 14:41:20 +00:00
Andrew Tridgell
c01663c1a9 extent smbtorture to test with both an exe file and a dat file
(This used to be commit dd2ce57504)
2000-01-08 11:37:45 +00:00
Andrew Tridgell
e8b5cb4515 cli_open() wasn't handling DENY_FCB or O_WRONLY correctly.
After fixing that I needed to use O_RDWR instead of O_WRONLY in
several places to avoid the silly bug in MS servers that doesn't allow
getattrE on a file opened with O_WRONLY
(This used to be commit e21aa4cb08)
2000-01-08 10:15:53 +00:00
Andrew Tridgell
6ba295ce0b added a DENY test that tests deny mode handling. It produces a matrix
of 324 lines (6*6*3*3) of all possible deny mode behaviour. This
allows us to compare with NT. We currently don't match :)
(This used to be commit 2071105b43)
2000-01-08 09:49:52 +00:00
Andrew Tridgell
171da4d787 this looks like a big commit, but it isn't really :)
This fixes our netbios scope handling. We now have a 'netbios scope' option
in smb.conf and the scope option is removed from make_nmb_name()

this was prompted by a bug in our PDC finding code where it didn't append
the scope to the query of the '*' name.
(This used to be commit b563be824b)
2000-01-07 06:55:36 +00:00
Andrew Tridgell
574788039f added the unexpected packet database (unexpected.tdb)
this means "nmblookup -S" now always works, even with broken servers
the database stores all unexpected replies and these can be accessed
by any client.
while doing this I cleaned up a couple of functions, and put in place
a better trn_id generator. in most places the code got quite a bit
simpler due to the addition of simple helper functions.

I haven't yet put the code in to take advantage of this for pdc
replies - that will be next. Jeremys pdc finding code will then work :)
(This used to be commit 280e6359d3)
2000-01-03 03:17:16 +00:00
Andrew Tridgell
9a781a8c6d - added tdb_flags option to tdb_open()
- added TDB_CLEAR_IF_FIRST flag to clear the database if this is the
  first attached process. Useful for non-persistent databases like our
  locking area (this will also make upgrades to new database layouts easier)
- use lock_path() in a couple of places
- leave connections database open while smbd running
- cleaned up some tdb code a little, using macros for constants
(This used to be commit 00e9da3ca5)
2000-01-02 23:00:27 +00:00
Andrew Tridgell
fc4e722127 improved error message in case the lock list is truncated
(This used to be commit f4ecc5a8e3)
1999-12-22 01:36:27 +00:00
Andrew Tridgell
488115dbce changed message is connections.tdb doesn't exist
(This used to be commit 835b9881c0)
1999-12-21 09:33:45 +00:00
Andrew Tridgell
4e1291a83f converted all our existing shared memory code to use a tdb database
instead of either sysv or mmap shared memory or lock files.

this means we can now completely remove
	locking_shm.c
	locking_slow.c
	shmem.c
	shmem_sysv.c
and lots of other things also got simpler

locking.c got a bit larger, but is much better compartmentalised now
(This used to be commit e48c2d9937)
1999-12-21 09:25:59 +00:00
Andrew Tridgell
69d24d869b first cut at using the tdb code for the connections structure, the
SWAT status page and smbstatus. It made the code _much_ simpler, I
wish we'd done a database module a long time ago!
(This used to be commit 4951755413)
1999-12-21 04:54:30 +00:00
Andrew Tridgell
0c4b1ea014 this was left out from the 2.0.6 merge
(This used to be commit 7067aeecab)
1999-12-21 03:05:38 +00:00
Andrew Tridgell
418ba2933f more files from 2.0.6
(This used to be commit 4a20579571)
1999-12-17 01:52:05 +00:00
Andrew Tridgell
32a965e09c 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files that were in the head branch but weren't in SAMBA_2_0
(This used to be commit d7b2087865)
1999-12-13 13:35:20 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
4f8a24522c final part of "first" phase converting over to msrpc daemon architecture.
done a minimal amout of clean-up in the Makefile, removing unnecessary
modules from the link stage.  this is not complete, yet, and will
involve some changes, for example to smbd, to remove dependencies on
the password database API that shouldn't be there.  for example,
smbd should not ever call getsmbpwXXX() it should call the Samr or Lsa
API.

this first implementation has minor problems with not reinstantiating
the same services as the caller.  the "homes" service is a good example.
(This used to be commit caa5052522)
1999-12-12 20:03:42 +00:00
Gerald Carter
12ca139d5c OK. This code works on a RedHat 6.0 system. However smbpasswd
time out of sending the session setup on Solaris 2.6.  No idea.
I'll work on it some tomorrow.  This is to fix the "Unable to
setup password vectors" thingy.

Also changed an inet_aton() to inet_addr() as the former is
not very portable :-)

Luke,  I set the redir flag to false because the connection to
the smb-agent was failing and smbpasswd bombed.  Double check me
on this one.



-jc
(This used to be commit e1d2b174ca)
1999-12-09 07:06:12 +00:00
Luke Leighton
4ab9d91428 ABOUT TIME!!!!!!!!
damn, this one is bad.

started, at least two days ago, to add an authentication mechanism to
the smbd<->msrpc redirector/relay, such that sufficient unix / nt
information could be transferred across the unix socket to do a
become_user() on the other side of the socket.

it is necessary that the msrpc daemon inherit the same unix and nt
credentials as the smbd process from which it was spawned, until
such time as the msrpc daemon receives an authentication request
of its own, whereupon the msrpc daemon is responsible for authenticating
the new credentials and doing yet another become_user() etc sequence.
(This used to be commit 30c7fdd6ef)
1999-12-08 21:43:03 +00:00
Luke Leighton
854f35e20f created create_pipe_socket() function.
(This used to be commit a3af3b4312)
1999-12-05 00:13:17 +00:00
Luke Leighton
ddda7722a6 argh! how horrible! spent ages working out why packets weren't being
received properly when a UDP "retry" occurs.  it's because reads and
writes must be interleaved / matched.

scenario:

nmblookup connects to agent, sends request.

agent receives request, broadcasts it on 137.

agent RECEIVES 137 broadcast, sends it to nmblookup

agent receives RESPONSE to 137 broadcast, sends it to nmblookup.

if reads are not equally interspersed with writes, then second send
will fail.

if you think this is odd behaviour and that the agent should be filtering
its own UDP traffic, think again.

agent will be, potentially, redirecting nmbd traffic (including WINS
server) not just client programs.
(This used to be commit 43e158c426)
1999-12-04 23:40:21 +00:00
Luke Leighton
c41205e28f even more cool! nmb-agent moved over to new vagent style, too!
(This used to be commit 49c157eae4)
1999-12-04 22:05:59 +00:00
Luke Leighton
f6077db317 cool! created higher-order function table for agent redirection.
(This used to be commit 7bb2e55d0d)
1999-12-04 21:55:39 +00:00
Luke Leighton
9b44e117f9 more similar agent code
(This used to be commit 2c778313b8)
1999-12-04 20:43:45 +00:00
Luke Leighton
4503221852 nmb agent memory free problems
(This used to be commit b4306cbf06)
1999-12-04 20:29:03 +00:00
Luke Leighton
409798953d trying to make redirector agent code same base.
(This used to be commit 9ba9df453a)
1999-12-04 20:11:31 +00:00
Luke Leighton
f521205cb3 jeremy is going to hate me for this.
created an "nmb-agent" utility that, yes: it connects to the 137 socket
and accepts unix socket connections which it redirects onto port 137.

it uses the name_trn_id field to filter requests to the correct
location.

name_query() and name_status() are the first victims to use this
feature (by specifying a file descriptor of -1).
(This used to be commit d923bc8da2)
1999-12-04 19:14:37 +00:00
Luke Leighton
8a8a7da518 argh! you wouldn't believe what i had to do: use the mid (multiplex id)
to redirect multiple socket-based connnections onto a single client state.

argh!
(This used to be commit 06390e792c)
1999-12-04 00:49:13 +00:00
Luke Leighton
0ca1f87930 argh! smb-agent redirection client reusage is a nightmare!
moved smb-agent over to a single-process model instead of fork()
in order to reuse client connections.  except, of course, you
can't do a select() on the same socket connections!  argh!
(This used to be commit e9e5a34de8)
1999-12-03 23:36:53 +00:00
Luke Leighton
c2a3b11b07 starting "connection reuse" system in smb-agent. added version number
which isn't actually used right now :-)
(This used to be commit d54a64ae3a)
1999-12-03 22:02:03 +00:00
Luke Leighton
6eebe18fa9 smb-agent improvements. added -D (daemon) option. smb agent is
restricted to connections from the current user (socket is created
with current user uid).
(This used to be commit 5af076e4b7)
1999-12-03 19:55:34 +00:00
Luke Leighton
7d01f964ff cool! a unix socket smb redirector. code based on smbfilter and
ideas from ssh-agent.

the intent is to be able to share smb sessions using cli_net_use_add()
across multiple processes, where one process knows the target server
name, user name and domain, but not the smb password.
(This used to be commit 294b653f2e)
1999-12-03 18:16:08 +00:00
Luke Leighton
86ac6fa938 fixing joining to domain plus something weird going down with nt logins...
(This used to be commit cef258f1c9)
1999-12-01 19:25:51 +00:00
Luke Leighton
6ddfc68e04 sys_select added one more argument (read, write selectors).
(This used to be commit e4d92ff9df)
1999-12-01 02:15:14 +00:00
Luke Leighton
f8b82a7b95 first stages of removing struct cli_state* and uint16 fnum from all
msrpc client code.  the intent is to hide / abstract / associate
connection info behind policy handles.

this makes the msrpc functions look more and more like their nt equivalents.

who-hou!
(This used to be commit c01b18e632)
1999-11-24 20:24:33 +00:00
Luke Leighton
27b8df4d9b attempting to establish inter-domain trust relationships. modified
smbpasswd so it can be used to set up inter-domain trust account.
(This used to be commit 99ec0620c3)
1999-11-20 21:59:16 +00:00
Luke Leighton
d2d6144253 event log update, netsessenum, netconnenum update.
(This used to be commit 819af56074)
1999-08-18 20:33:49 +00:00
Luke Leighton
06b4627df0 patch from Michael Glauche to call get_status_connections() instead of
reading STATUS..LCK direct.
(This used to be commit d794e2eb51)
1999-08-18 00:12:19 +00:00
Matthew Chapman
8f54fdb01a BDC support.
Added -S (Synchronise) option to smbpasswd, which calls synchronise_passdb.
(This used to be commit 21c92d2497)
1999-07-22 10:55:41 +00:00
Luke Leighton
6a5a4e8186 BDC support.
(This used to be commit 2331aa32ab)
1999-07-21 00:32:09 +00:00
Luke Leighton
73891ca8e4 improving authentication code (tidyup).
(This used to be commit ab1a6aa42d)
1999-06-29 18:47:06 +00:00
Luke Leighton
cae3620b2e safe string error reporting functions (found a potential buffer overflow
of a pstrcpy into an fstring).
(This used to be commit ac0060443d)
1999-06-24 18:58:08 +00:00
Luke Leighton
810d9a1627 variation of random SMBtrans2. random delays in between reconnections
increased.  size of large random buffer decreased.  number of reconnection
attempts increased.
(This used to be commit 980a7b11f3)
1999-05-07 20:21:30 +00:00
Luke Leighton
94a4094f44 had to move day display names into lib/util, to get rpctorture to compile.
(This used to be commit 8c80742e4e)
1999-05-07 18:20:59 +00:00
Andrew Tridgell
4c5c9d6734 open_socket_in() takes a different number of parameters in the head
branch. We need that merge soon!
(This used to be commit 5fb06c603e)
1999-04-17 14:13:06 +00:00
Andrew Tridgell
a32c926289 damn, new files need to be added to the head branch first, I've told
other people this before then forgot myself :)
(This used to be commit a116228d37)
1999-04-17 14:06:57 +00:00
Tim Potter
94928d4de7 Modification to compile under egcs 2.91.63.
(This used to be commit d04c530836)
1999-04-11 00:27:43 +00:00
Matthew Chapman
a1d6f07e54 Mainly BDC-related changes.
* Added SEC_CHAN_BDC
* Added -b switch to smbpasswd (for a BDC (server) trust account).
* Propagate sec_chan into the various functions which change trust account
  passwords, so they can be used for domain control and inter-domain
  trusts.
(This used to be commit 6f2b37bfc5)
1999-04-08 05:37:15 +00:00
Andrew Tridgell
d330c907bd Ken McDonell from SGI was interested in adding some profiling
capabilities to Samba so that Samba could talk to the SGI PCP
(Performance Co-Pilot) apps.

This change adds a profiling shared memory area and uses it to count
two fairly trivial things, the number of uid switches and the number
of SMB packets processes. To add more just edit include/profile.h and
then increment it at the right place.

I've also added a -P switch to smbstatus to dump the profile area.
(This used to be commit ef3d61a80a)
1999-04-01 05:22:58 +00:00
Luke Leighton
fda194255c Beau Kuiper: provided patch so that passwords could only be changed by
root if the ACB_PWLOCK bit is set (on a per-user basis).  he also added
an extra smbpasswd option so that this bit can be modified from
command-line.
(This used to be commit 534fe319d9)
1999-03-19 05:00:39 +00:00
Luke Leighton
a3c6e96a22 mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
(This used to be commit 62d499f832)
1999-03-09 01:21:57 +00:00
Luke Leighton
f02321a998 refinement of random ipc$ SMBtrans torture test. send requests, and
don't wait for responses :-)
(This used to be commit c1d65e9060)
1999-02-11 18:35:26 +00:00
Luke Leighton
8b6b6b57b5 use jeremy's versions of the UNICODE routines.
(This used to be commit c5109ff782)
1999-02-10 22:30:47 +00:00
Christopher R. Hertel
4423c27fe5 Fuss fuss fuss.
Added missing default: statements to two switch blocks.

Chris -)-----
(This used to be commit 0681f6946b)
1999-01-27 18:22:48 +00:00
Luke Leighton
0637d46d60 compilation errors due to addition of smb file handle parameter.
(This used to be commit 03967986ec)
1999-01-27 00:03:31 +00:00
Matthew Chapman
e10503d1a2 Added load_interfaces in smbpasswd to allow name resolution by broadcast and
multiple interfaces. (Jeremy already committed this in SAMBA_2_0).
(This used to be commit f530e289c6)
1999-01-18 01:32:45 +00:00
Christopher R. Hertel
8cb794707b While writing the man page, I realized that it was a bit silly not to accept
command-line parameters.  I've added that capability.  Of course, the man
page is now wrong.  Sigh.

Chris -)-----
(This used to be commit 300a8c9e50)
1998-12-29 20:43:01 +00:00
Christopher R. Hertel
7bf6e4d6a0 Sorry that this is going so slowly.
I've added debug2html to Makefile.in so that it compiles as part of the
normal build.  Fixed a typo in debug2html.c as well.

One problem:  I found it necessary to link with both $(PARAM_OBJ) and
              $(LIB_OBJ).  The result is an executable that is much larger
              than it really needs to be.
(This used to be commit d2d6f0bf36)
1998-12-28 22:34:08 +00:00
Christopher R. Hertel
dc003d8d40 A while back, Andrew and I talked about making the debug parsing code a
better "fit" with other Samba code.  This is a small first step toward
doing what (I think) we agreed to do.

I've moved the key function from ubiqx/debugparse.c into lib/debug.c.  I
have also moved the enum from ubiqx/debugparse.h into the debug section in
smb.h.

The next thing to do is to get debug2html added into the Makefile.in so
that it is always produced when compiling the suite.

Chris -)-----
(This used to be commit 782474f41e)
1998-12-16 18:50:54 +00:00
Luke Leighton
9c848ec329 removed nt_pipe_fnum from struct cli_state. need to be able to call
LsaLookupSids etc from within SamrQueryAliasMembers, for example.
fnum is now a parameter to client functions.  thanks to mike black
for starting the ball rolling.
(This used to be commit bee8f7fa6b)
1998-12-07 20:23:41 +00:00
Luke Leighton
04e382fb16 rpc_samr.h parse_samr.c srv_samr.c :
samr_query_aliasmembers (cool!)

util_pwdb.c sids.c nmbd.c server.c smbpasswd.c swat.c :

	pwdb_initialise(BOOL is_server) now creates / reads DOMAIN_NAME.SID
	if is_server is True, and does LsaQueryInfoPolicy(levels 3 and 5)
	to obtain member and pdc sids.
(This used to be commit 3e1eb4f26b)
1998-12-01 19:10:44 +00:00
Luke Leighton
dc879e9ca7 pwdb_initialise() in the wrong place: must load smb.conf first. thanks phil.
(This used to be commit 4b5bd4e18c)
1998-11-30 19:29:32 +00:00
Luke Leighton
30038de462 weekend work. user / group database API.
- split sam_passwd and smb_passwd into separate higher-order function tables

- renamed struct smb_passwd's "smb_user" to "unix_user".  added "nt_user"
plus user_rid, and added a "wrap" function in both sam_passwd and smb_passwd
password databases to fill in the blank entries that are not obtained
from whatever password database API instance is being used.

NOTE: whenever a struct smb_passwd or struct sam_passwd is used, it MUST
be initialised with pwdb_sam_init() or pwd_smb_init(), see chgpasswd.c
for the only example outside of the password database APIs i could find.

- added query_useraliases code to rpcclient.

- dealt with some nasty interdependencies involving non-smbd programs
and the password database API.  this is still not satisfactorily
resolved completelely, but it's the best i can do for now.

- #ifdef'd out some password database options so that people don't
mistakenly set them unless they recompile to _use_ those options.

lots of debugging done, it's still not finished.  the unix/NT uid/gid
and user-rid/group-rid issues are better, but not perfect.  the "BUILTIN"
domain is still missing: users cannot be added to "BUILTIN" groups yet,
as we only have an "alias" db API and a "group" db API but not "builtin-alias"
db API...
(This used to be commit 5d5d7e4de7)
1998-11-29 20:03:33 +00:00
Luke Leighton
c9b2f20efc fixing domain join and domain login problems
(This used to be commit 90a2466431)
1998-11-25 14:54:23 +00:00
Herb Lewis
735631539c update testparm with -s option so it doesn't require a carriage return
also allow specifying [host hostip] without [configfile]
updated man page
(This used to be commit 85fbd40102)
1998-11-19 21:17:58 +00:00
Jeremy Allison
9579b98237 Added OSF1 changes to HEAD (-lsecurity etc.)
groupdb/groupdb.c: Fixed compile error caught by IRIX compiler.
utils/smbpasswd.c: Fixed SunOS optind, optarg problem.
Jeremy.
(This used to be commit 30af39ae1e)
1998-11-18 22:04:24 +00:00
Jeremy Allison
768761820e 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.
(This used to be commit 18ff93a9ab)
1998-11-17 20:50:07 +00:00
Luke Leighton
74d539f557 - 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.
(This used to be commit 0d21e1e609)
1998-11-17 16:19:04 +00:00
Jeremy Allison
f4447df41b Added fixes for machine accounts.
Jeremy.
(This used to be commit 7aa644c2f9)
1998-11-16 20:19:57 +00:00
Andrew Tridgell
2db96e3047 fixes for OSF1 compilation
(This used to be commit 5be3c37f50)
1998-11-13 03:37:01 +00:00
Luke Leighton
31c4953088 sids in rpctorture changed from fstrings to DOM_SID
(This used to be commit bd09e00112)
1998-11-13 01:08:28 +00:00
Herb Lewis
ea2fa33f65 Removed code that used printf/fprintf in password changin libraries.
Now passes strings instead.
(This used to be commit 48af29bcc9)
1998-11-12 23:49:32 +00:00
Jeremy Allison
3a334e3e6c Fixed smbpasswd so that enabling a user who already has a password
doesn't require a new password entry. Sets the 'enable/disable' code
back to being symmetrical.
Jeremy.
(This used to be commit fa068a6db8)
1998-11-12 20:22:11 +00:00
Andrew Tridgell
29e36b7134 extracted the password change code from smbpasswd and used it in swat
instead of opening pipes and other horrible stuff.
(This used to be commit 49bf197103)
1998-11-12 07:06:48 +00:00
Andrew Tridgell
4f368d8b92 char -> uchar fix
(This used to be commit badc0f229a)
1998-11-12 06:24:18 +00:00
Andrew Tridgell
d85dcf86d5 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.
(This used to be commit 713864dd03)
1998-11-12 06:12:19 +00:00
Jeremy Allison
375e53826c include/local.h:
include/smb.h:
param/loadparm.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-).
printing/printing.c: Added J.F.'s latest fix.
rpc_parse/parse_misc.c:
parse_reg.c:
rpcclient/cmd_reg.c:
rpcclient/display.c: SGI compiler signed/unsigned issues.
smbd/reply.c: Made GUEST_SESSSETUP run time selectable. Horror of horrors :-).
utils/testparm.c: Added extra test.
Jeremy.
(This used to be commit 9668a5ef50)
1998-11-10 20:51:25 +00:00
Andrew Tridgell
8c62b28e0e converted smbclient to use clientgen.c rather than clientutil.c
I did this when I saw yet another bug report complaining about
smbclient intermittently missing files. Rather than applying more
patches to smbclient it was better to move to the more robust
clientgen.c code.

The conversion wasn't perfect, I probably lost some features of
smbclient while doing it, but at least smbclient should be consistent
now. It if fails it should _always_ fail rather than giving people the
false impression of a reliable utility.

the tar stuff seems to work, but hasn't had much testing as I never
use it myself. I'm sure someone will find bugs in my conversion of
smbtar.c. It was quite tricky as it did a lot of its own SMB calls. It
now uses clientgen.c exclusively.

smbclient is still quite messy, but at least it doesn't build its own
SMB packets.

I haven't touched smbmount as I never use it. Mike, do you want to
convert smbmount to use clientgen.c?
(This used to be commit e14ca7765a)
1998-11-09 03:45:49 +00:00
Jeremy Allison
548b417d40 codepages/codepage_def.936: Updated comment.
param/loadparm.c: Removed "networkstation user login", "domain controller", and "domain sid" parameters.
passdb/passdb.c: Removed "networkstation user login" code and changed bug test code
                 to only check once for a bad password server. This will stop the
                 complaints of many "bad login" audit records in NT PDC logs.
utils/smbpasswd.c: Removed check for "domain controller".
Jeremy.
(This used to be commit d6e6e936b5)
1998-11-07 05:32:37 +00:00
Jeremy Allison
4bd1feb68c 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.
(This used to be commit b5981c0149)
1998-11-06 18:40:51 +00:00
Andrew Tridgell
fa164d91bd check return value of locking_init()
(This used to be commit 0efac70f75)
1998-11-05 12:40:37 +00:00
Jeremy Allison
5f4c35ab21 Added scripting option (-s) to smbpasswd.
Jeremy.
(This used to be commit 4f87a8cf99)
1998-11-04 00:57:00 +00:00
Jeremy Allison
01e04614c7 Makefile.in configure configure.in include/proto.h smbd/noquotas.c smbd/quotas.c:
Added quotas patch for autoconf from Dejan Ilic <svedja@lysator.liu.se>.
printing/printing.c: Filenames with spaces patch from Allan Bjorklund <allan@umich.edu>
utils/nmblookup.c: Fix usage() function.
smbd/reply.c: Split out the security=server and security=domain checks into
              check_server_security() and check_domain_security() to aid the
              writing of the 'hack' appliance mode invented by John Schimmel.
Jeremy.
(This used to be commit f09ab9b522)
1998-11-03 02:25:28 +00:00
Jeremy Allison
8851d1a150 Fix suggested by Nicholas.S.Jenkins@cdc.com - connect to the
password change server as anonymous - you don't need to have
logged on as the user to do the password change. Doh ! (Why
didn't *I* think of that one.... :-).
Jeremy.
(This used to be commit dd3bb250a6)
1998-10-30 23:53:04 +00:00
Christopher R. Hertel
f97ceef7ec I've moved the debugparse module files into the ubiqx directory because I
know that 'make proto' will ignore them there.  The debugparse.h header
file is included in includes.h, and includes.h is included in debugparse.c,
so all of the pieces "see" each other.  I've compiled and tested this,
and it does seem to work.  It's the same compromise model I used when
adding the ubiqx modules into the system, which is why I put it all into
the same directory.

Chris -)-----
(This used to be commit b6888faacd)
1998-10-28 20:33:35 +00:00
Christopher R. Hertel
e04759fbab Fixed a small bug in debug2html. It wasn't properly checking EOF. The
current status is "it works".  I need to add some syntax error recovery
and a usage message.  Basic stuff.

I've also modified Makefile.in.  If you want to compile it you'll have to
do a 'make debug2html', as I used smbtorture as a model.  We can decide
later if this tool is useful enough to be compiled always.

BTW, a 'make realclean' fails because the bin directory isn't empty.
That's because it doesn't delete optionally compiled files such as
smbtorture and debug2html (and because of the CVS subdirectory, but I
think that's only a problem for developers).

Chris -)-----
(This used to be commit e86fd87a38)
1998-10-27 23:28:29 +00:00
Christopher R. Hertel
ba91cb69be 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 -)-----
(This used to be commit fae161b905)
1998-10-26 23:21:37 +00:00
Andrew Tridgell
fb556e14f3 volker was concerned about unique inode numbers and smbsh. This set of
changes uses the unique index number from a SMB_QUERY_FILE_ALL_INFO to
try to provide inode numbers. If it is 0 then use the hash of the
filename as before.
(This used to be commit 2565ccf9de)
1998-10-24 08:08:05 +00:00
Luke Leighton
95056761c8 torture debug.
(This used to be commit 9760959664)
1998-10-22 23:05:55 +00:00
Luke Leighton
f0d3a44ffa enumeration tests (files, sessions, shares, connections).
hey, you can see how many connections succeed while the rpctorture
command is running!
(This used to be commit c1bf8f1099)
1998-10-22 22:54:00 +00:00
Luke Leighton
a0512ce5ff rpctorture command
(This used to be commit b4ae65e2d0)
1998-10-22 22:19:08 +00:00
Andrew Tridgell
e4678f5d1d fixed a connection bug in torture test
(This used to be commit 2b892130df)
1998-10-20 06:46:25 +00:00
Andrew Tridgell
bad4e66489 added maxfid test
(This used to be commit 710027a88a)
1998-10-16 23:08:10 +00:00
Andrew Tridgell
bc747b8a07 set recursion desired for bcast name query
(This used to be commit 53805112f1)
1998-10-14 16:45:24 +00:00
Luke Leighton
6909350ed9 dce/rpc
(This used to be commit 62fdeef1b7)
1998-10-08 23:57:46 +00:00
Andrew Tridgell
a813f38e2d - don't generate 0 params in torture
- handle 0 params in ipc.c
(This used to be commit c0dc8e87f0)
1998-10-08 06:49:00 +00:00
Andrew Tridgell
788263ba2f - fixed a bunch of warnings and minor errors
- got smbtorture to compile
- removed %D from some of lukes code - Luke, what is %D? it ain't
  portable anyway
(This used to be commit 91597c12fb)
1998-10-08 06:21:33 +00:00
Andrew Tridgell
4750ce1760 use 1 second resolution calls if possible
(This used to be commit 349469221a)
1998-10-08 02:28:21 +00:00
Andrew Tridgell
40984f6b55 - modified resolve_name() to take a name_type
- cleaned up resolve_name() (split into separate functions for each resolver)
- if can't find local master then use #1B name
- support listing of foreign workgroups in /smb/
(This used to be commit a4e607c17d)
1998-10-04 12:00:40 +00:00
Andrew Tridgell
f651787785 added lseek() support for directories
(This used to be commit 67ca971b0b)
1998-10-03 12:33:34 +00:00
Luke Leighton
bdbc959a9a - static function "create_new_hashes" was identical to "nt_lm_owf_gen".
create_new_hashes didn't zero the buffer for the md4hash: nt_lm_owf_gen
  did, because jeremy sorted this out a couple of days ago.  call
  nt_lm_owf_gen instead.

- call SMBOWFencrypt from SMBencrypt and SMBNTencrypt.

- added #ifdef DEBUG_PASSWORD debug password calls.
(This used to be commit a4e7cc3e46)
1998-10-02 18:45:07 +00:00
Andrew Tridgell
495eedb14f some changes in smbtorture as a result of clientgen interface changes
for smbwrapper

note that Lukes client changes broke smbtorture. This doesn't fix it,
but at least I didn't break it more than it was.
(This used to be commit 252b52091c)
1998-10-02 12:38:45 +00:00
Jeremy Allison
008fd97309 Fixed problems found in lint pass over the old code by <cpeterso@microsoft.com>.
These were the problems that still existed in the 2.0 branch.
Jeremy.
(This used to be commit 3fd28812f7)
1998-09-28 23:55:09 +00:00
Jeremy Allison
cf3a9741dc Changes to test in configure if capabilities are enabled on a system.
Changes to get Samba to compile cleanly with the IRIX compiler
with the options : -fullwarn -woff 1209,1174 (the -woff options
are to turn off warnings about unused function parameters and
controlling loop expressions being constants).
Split prototype generation as we hit a limit in IRIX nawk.
Removed "." code in smbd/filename.c (yet again :-).
Jeremy.
(This used to be commit e0567433bd)
1998-09-28 21:43:48 +00:00
Alexandre Oliva
cf971f88ac automated generation of .dummy files for each subdirectory;
dummy.in files are no longer needed, and new directories will be taken
care of automatically, at configure (or config.status --recheck) time
(This used to be commit 237a8e5fe6)
1998-09-28 00:14:36 +00:00
Richard Sharpe
ecd8ca2431 Fixed up more possibly uninitialized variables.
Now only two compilation warnings seem to be left.

Luke may want to check the changes I made.
(This used to be commit 2456c95c16)
1998-09-27 08:29:50 +00:00
Jeremy Allison
5f7ee36056 Makefile.in: Fixed bug with continuation line causing proto to fail.
Added $(PROGS) $(SPROGS) as targets for make clean.
acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES.
configure.in: Added sys/capability.h header check.
              Added function checks for srandom random srand rand.
              Added HAVE_IRIX_SPECIFIC_CAPABILITIES test.
includes.h: Added #include <sys/capability.h>.
ntdomain.h: Moved struct acct_info into here from smb.h
smb.h: Added KERNEL_OPLOCK_CAPABILITY define.
       Moved enum action_type into rpcclient.h
       Moved struct cli_state into client.h
       Moved struct nt_client_info, struct tar_client_info, struct client_info
             into rpcclient.h
lib/genrand.c: Changed to use sys_random() & friends.
lib/smbrun.c: Lose capabilities after fork.
lib/system.c: Added set_process_capability(), set_inherited_process_capability()
              sys_random(), sys_srandom().
lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an
            32 bit mounted NFS filesystem.
nmbd/nmbd.c: Changed to use sys_random() & friends.
nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends.
passdb/ldap.c: Missed one pdb_encode_acct_ctrl call.
passdb/passdb.c: Changed to Ander's code for ' ' characters.
passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ.
script/mkproto.awk: Added 'long' to prototypes.
smbd/chgpasswd.c: Lose capabilities after fork.
smbd/open.c: Do the mmap *after* the kernel oplock.
smbd/oplock.c: Removed stub code from kernel oplock path.
               Added set_process_capability(), set_inherited_process_capability() calls.
smbd/reply.c: Initialize count = 0, offset = 0.
smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls.
tests/summary.c: Ensure we have RANDOM or RAND.
utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ.
utils/torture.c: Changed to use sys_random() & friends.

Jeremy.
(This used to be commit e8be306f23)
1998-09-25 23:40:49 +00:00
Luke Leighton
ff07b2e4a3 added wksinfo command to rpcclient, which don't work too good.
(This used to be commit 8d23da91cb)
1998-09-25 21:20:37 +00:00
Luke Leighton
66d5d73a5d added rpcclient program
(This used to be commit aa38f39d67)
1998-09-25 21:01:52 +00:00