Michael Warfield [Thu, 18 Feb 1999 04:33:06 +0000 (04:33 +0000)]
Got to the bottom of another weird one...
Piping the output of smbmount back to autofs/automount was causing the
automount process to hang. Reason was that automount was depending
on the pipe to close to continue on, rather than detecting the child
signal. This occured with debug enabled and the daemon process was not
closing the stdout process. Disabling debuging avoids the problem.
Debugging is turned off in the cvs repository and a warning placed over
the debugging option.
Luke Leighton [Tue, 16 Feb 1999 18:04:21 +0000 (18:04 +0000)]
rpcclient shutdown command
Luke Leighton [Tue, 16 Feb 1999 18:02:50 +0000 (18:02 +0000)]
bitmap to strings
Matthew Chapman [Mon, 15 Feb 1999 05:33:30 +0000 (05:33 +0000)]
Always null-terminate strings.
Also some string length and sizeof(pointer) corrections.
Matthew Chapman [Mon, 15 Feb 1999 05:31:52 +0000 (05:31 +0000)]
Always null-terminate strings.
Michael Warfield [Sun, 14 Feb 1999 23:15:54 +0000 (23:15 +0000)]
Added caching of user password if it was entered via getpass. We were already
caching the password if it came from the command line or from the environment.
This completes the set and deals with the bloody nusance when reconnecting
a connection after we have gone daemon... Grrr...
Added code to clean up the mount point following a catastrophic failure
during reconnect. The smbmount daemon was exiting but leaving the mount
point in an unusable state. If smbmount must exit following a reconnect
failure, we "unmount" the mount point and clean up mnttab. Currently,
the unmount works, fixing some really ugly I/O errors and failure when
trying to remount. The cleanup on mnttab still has problems. This
is better than what it was and doesn't break anything that wasn't broken
before, so I'm committing this in even with the mnttab problem. Will
commit the fix to that when I figure out what is busted there...
-mhw-
John Terpstra [Sun, 14 Feb 1999 04:40:05 +0000 (04:40 +0000)]
Folding into Samba-2.1.X tree documents added to 2.0.3.
Michael Warfield [Sat, 13 Feb 1999 18:36:49 +0000 (18:36 +0000)]
Fixed a glibc glitch in smbumount.c and reenabled some debugging
in smbmount.c
Luke Leighton [Fri, 12 Feb 1999 15:35:27 +0000 (15:35 +0000)]
const cast issues. [p.s - tidy work, matt!]
Luke Leighton [Fri, 12 Feb 1999 15:34:57 +0000 (15:34 +0000)]
const issues with byte mod / byte read macros.
Matthew Chapman [Fri, 12 Feb 1999 03:09:24 +0000 (03:09 +0000)]
Cut and paste error.
Matthew Chapman [Fri, 12 Feb 1999 00:16:09 +0000 (00:16 +0000)]
UNICODE cleanup (see lib/util_unistr.c).
No more ugly static library buffers and all functions take a destination
string length (especially unistrcpy was rather dangerous; we were only
saved by the fact that datagrams are limited in size).
Luke Leighton [Thu, 11 Feb 1999 22:12:49 +0000 (22:12 +0000)]
UNICODE issues.
Luke Leighton [Thu, 11 Feb 1999 18:50:13 +0000 (18:50 +0000)]
the UNICODE issue...
Luke Leighton [Thu, 11 Feb 1999 18:48:18 +0000 (18:48 +0000)]
enum dom users buffer was 0x80 not 0x8000. must fix "enumeration" code
as you need to make multiple enum dom users calls.
Luke Leighton [Thu, 11 Feb 1999 18:35:26 +0000 (18:35 +0000)]
refinement of random ipc$ SMBtrans torture test. send requests, and
don't wait for responses :-)
Luke Leighton [Thu, 11 Feb 1999 17:25:26 +0000 (17:25 +0000)]
uninitialised pointer being freed if lookupnames failed. oops.
Luke Leighton [Wed, 10 Feb 1999 22:30:47 +0000 (22:30 +0000)]
use jeremy's versions of the UNICODE routines.
Luke Leighton [Tue, 9 Feb 1999 22:13:20 +0000 (22:13 +0000)]
Having Well-known Domain Groups ("Domain Admins/Guests/Users") returned
under SID_NAME_ENUM 0x5 instead of 0x2 (Well-known group instead of
Domain Group) was making it impossible to view these groups from USRMGR.EXE.
Luke Leighton [Tue, 9 Feb 1999 21:56:06 +0000 (21:56 +0000)]
groups and aliases being "manually" added which do not necessarily have
representation in the underlying database: removed this code.
for example, with the nt->unix mapping system (don't know about the ldap
one) if you want "Domain Admins" to appear you _must_ put it in the
domaingroup.map file.
the previous code was adding builtin aliases and well-known groups even
if they weren't in the domain maps. bad idea.
Luke Leighton [Tue, 9 Feb 1999 21:42:39 +0000 (21:42 +0000)]
when multiple independent large rpc calls come in on the same pipe,
prev_pdu_file_offset was not being re-initialised to zero.
Luke Leighton [Tue, 9 Feb 1999 19:51:44 +0000 (19:51 +0000)]
removal of the use of unistrn2 function: replace it with unistr2_to_str
which is more appropriate.
Luke Leighton [Tue, 9 Feb 1999 16:01:28 +0000 (16:01 +0000)]
pwdb_smb_to_sam was not returning NULL for nt name so that
pwdb_sam_map_names() was using a "blank" static string instead of
a NULL pointer for nt names. NULL means over-ride, so the nt name
got left as "blank".
this causes nt clients to terminate with extreme prejudice.
Matthew Chapman [Tue, 9 Feb 1999 03:57:10 +0000 (03:57 +0000)]
Fix for NT BSOD problem. There's no reason to have two "NT usernames" running
around anyway.
The real problem is, once again, the brokenness of pwdb_sam_map_names et al.
This time it is deciding to return blank NT usernames, which NT's redirector
objects to.
I'm currently working on improving the pwdb/mapping code, should be ready in a
couple of weeks.
Luke Leighton [Mon, 8 Feb 1999 23:40:49 +0000 (23:40 +0000)]
UNICODE byte ordering issue: typecast to uint16* replaced with SSVAL()
Luke Leighton [Mon, 8 Feb 1999 01:46:46 +0000 (01:46 +0000)]
reload_services needs to be called prior to init_files but after
get_myname.
Luke Leighton [Mon, 8 Feb 1999 00:24:57 +0000 (00:24 +0000)]
iteration of sam passwd entries was an order n-cubed algorithm due
to resolution of unix name to nt name being unnecessarily _inside_
another loop.
Luke Leighton [Wed, 3 Feb 1999 17:10:44 +0000 (17:10 +0000)]
initialise my name (used in %h) prior to loading smb.conf files.
Luke Leighton [Wed, 3 Feb 1999 16:30:54 +0000 (16:30 +0000)]
%s not $s
Luke Leighton [Wed, 3 Feb 1999 01:58:52 +0000 (01:58 +0000)]
corrections to get data stream for 2nd and subsequent pdus copied from
right place (forgot to subtract 0x18 header bytes)
Luke Leighton [Wed, 3 Feb 1999 00:49:24 +0000 (00:49 +0000)]
cache unix groups so that two-level getgrent calls don't occur.
Luke Leighton [Wed, 3 Feb 1999 00:48:27 +0000 (00:48 +0000)]
multiple dce/rpc PDUs failed to work after ntlmssp update was added.
Luke Leighton [Tue, 2 Feb 1999 19:53:10 +0000 (19:53 +0000)]
server type announcements modified to include the "role" of the server:
domain member, pdc, bdc.
Michael Warfield [Mon, 1 Feb 1999 22:01:29 +0000 (22:01 +0000)]
Minor change to bring smbmount in the main branch in line with some bzero
to memset changes...
Luke Leighton [Mon, 1 Feb 1999 16:32:01 +0000 (16:32 +0000)]
comma after DOM_MAP_USER removed
Matthew Chapman [Mon, 1 Feb 1999 05:25:54 +0000 (05:25 +0000)]
Must set password length to 24 after we encrypt a password.
Matthew Chapman [Mon, 1 Feb 1999 02:39:37 +0000 (02:39 +0000)]
Initialise NTTIME properly in make_reg_q_enum_key instead of using
unix_to_nt_time hack. Seems to me it's ignored anyway (dummy return
buffer?).
Matthew Chapman [Mon, 1 Feb 1999 02:37:45 +0000 (02:37 +0000)]
Fixed a domain functionality problem where NT clients would start
endlessly repeating a network SAMLOGON (hoping it to change, hmmm...).
( Guess what I found in pwdb_init_sam...
unix_to_nt_time(&user->logon_time, (time_t)-1);
unix_to_nt_time(&user->logoff_time, (time_t)-1);
unix_to_nt_time(&user->kickoff_time, (time_t)-1);
... )
Matthew Chapman [Mon, 1 Feb 1999 02:36:24 +0000 (02:36 +0000)]
Added init_nt_time function which initialises an NTTIME to -1.
Michael Warfield [Sun, 31 Jan 1999 21:28:55 +0000 (21:28 +0000)]
Ok... Yet another round of fixes for smbmount and autofs.
1) The earlier fix for the smbmount race conditions broke the PID
registration with smbfs. That fix has been backed out and
replaced by a signalling convention from the child smbmount
process back to the parent telling the parent when it is safe
to exit.
2) Fixing all of this uncovered a NASTY deadly embrace between smbmount,
smbmnt, and autofs. This was caused by the setsid call in the
daemon code. The smbmnt process no longer was registered as
"magic" because it was no longer in the autofs process group.
Many many kudos and thanks to H Peter Anvin for giving me the
clue to solving this agravating puzzle. The setsid was moved
down the where the child signals the parent and a warn left in
its place in the daemonize code.
3) Fixed (actually worked around with a BUTT UGLY HACK) a problem with
SMB_GET_MOUNTPID in smbumount.c. The smb_fs.h header file has
the parameter to this ioctl defined as a uid_t. Unfortunately
that's a 32 bit quantity under glibc and it's currently a 16 bit
quantity in kernel space. Undefined the macro and redefined
it with a parameter of __kernel_uid_t. That should keep us
out of trouble till I can have someone fix smb_fs.h in the
kernel sources...
Luke Leighton [Fri, 29 Jan 1999 21:22:08 +0000 (21:22 +0000)]
fix for enumerate domain users (bug spotted by sean matthews).
also needed to use start index properly and generate next index.
both client and server code need to recognise error code 0x105
when there's not enough room to store all the users in one call.
sort this out another time.
Luke Leighton [Fri, 29 Jan 1999 19:31:52 +0000 (19:31 +0000)]
removed encrypt-password code pre-cli_session_setup(), session setup
fn decides whether to encrypt password or not.
Luke Leighton [Fri, 29 Jan 1999 19:20:27 +0000 (19:20 +0000)]
uni_svc_name not uni_srv_name
Luke Leighton [Thu, 28 Jan 1999 21:11:15 +0000 (21:11 +0000)]
rpcclient "Service Control Manager" svcenum [-i] command.
Luke Leighton [Thu, 28 Jan 1999 21:10:38 +0000 (21:10 +0000)]
error code cleanup
Luke Leighton [Thu, 28 Jan 1999 18:40:53 +0000 (18:40 +0000)]
returned cli_session_setup to previous behaviour. added a couple of
validation checks and also added capability to send plaintext passwords.
send "ntpasslen" of zero to do this. sending same plaintext password
for pass and ntpass arguments will result in previous behaviour of
encrypting password if server supports it.
Luke Leighton [Wed, 27 Jan 1999 20:31:58 +0000 (20:31 +0000)]
Service Control Manager - service enumeration.
Luke Leighton [Wed, 27 Jan 1999 19:37:29 +0000 (19:37 +0000)]
set_port warning / unused / global/local variable overlap issues
cmd_svcctl.c tests got put into cvs by mistake.
Christopher R. Hertel [Wed, 27 Jan 1999 18:22:48 +0000 (18:22 +0000)]
Fuss fuss fuss.
Added missing default: statements to two switch blocks.
Chris -)-----
Luke Leighton [Wed, 27 Jan 1999 00:08:33 +0000 (00:08 +0000)]
- got client code cleartext passwords working again in cli_session_setup.
needed this for some tests.
- removed code that said "if lm password is not encrypted then encrypt both
lm and nt passwords". actually it said "if lm password length is not 24
bytes and we're in security=user mode..."
it didn't bother to check whether the nt password was NULL or not, and
doing the encryption inside cli_session_setup is the wrong place.
- checked all instances where cli_session_setup is called with cleartext
passwords that are expected to then be encrypted (see above) with the
test "if pwlen != 24...". there was only one: all the others either
provide encrypted passwords, do null sessions or use
cli_establish_connection.
* recommendation: use cli_establish_connection() in smbwrapper/smbw.c
Luke Leighton [Wed, 27 Jan 1999 00:03:31 +0000 (00:03 +0000)]
compilation errors due to addition of smb file handle parameter.
Richard Sharpe [Mon, 25 Jan 1999 01:46:14 +0000 (01:46 +0000)]
Putting back the -p flag in smbclient.
However, it seems that the -s flag
in smbclient is also ignored :-(
Richard Sharpe [Mon, 25 Jan 1999 00:36:45 +0000 (00:36 +0000)]
More changes to get SSL working with 2.x.x
Now, we have most of the configure support done, next
have to fix Makefile.in and other things ...
Richard Sharpe [Sun, 24 Jan 1999 14:20:19 +0000 (14:20 +0000)]
Fixing up configure to properly support ssl
Richard Sharpe [Sun, 24 Jan 1999 14:08:55 +0000 (14:08 +0000)]
Adding first of the fixes for SSL.
A whole bunch of string variables in loadparm.c were
not being initialized properly. Programs crashed as a result.
This set of code not tested, but same code tested elsewhere,
and all this guarded by #ifdef HAVE_SSL
Matthew Chapman [Mon, 18 Jan 1999 01:35:43 +0000 (01:35 +0000)]
In security=user mode we must allow cli_connect_serverlist to connect to our
own smbd process, rather than complaining about a password server loop.
Matthew Chapman [Mon, 18 Jan 1999 01:32:45 +0000 (01:32 +0000)]
Added load_interfaces in smbpasswd to allow name resolution by broadcast and
multiple interfaces. (Jeremy already committed this in SAMBA_2_0).
Richard Sharpe [Sun, 17 Jan 1999 01:03:52 +0000 (01:03 +0000)]
A small change to clitar.c (really, I promise :-)
If we are writing the tar file to stdout, set dbf to stderr
so that we do not screw up tar output with log info etc.
Compiles clean and tested with 38MB backup. Honest :-)
Matthew Chapman [Fri, 15 Jan 1999 05:09:36 +0000 (05:09 +0000)]
eclass != ERRDOS && num != ERRmoredata
is not the same as
!(eclass == ERRDOS && num == ERRmoredata)
This was causing smbclient to segfault on receiving certain errors.
Matthew Chapman [Fri, 15 Jan 1999 05:02:41 +0000 (05:02 +0000)]
Fixed typo in srv_samr.c where samr_add_groupmem and samr_del_groupmem were
the wrong way around.
Matthew Chapman [Fri, 15 Jan 1999 05:00:26 +0000 (05:00 +0000)]
Finally committing my LDAP changes.
* Added new APIs for modifying groups.
* RIDs are allocated similarly to NT, starting from 1000 and incrementing by 1
for each new user/group.
* RIDs are now consistently in hex
* Fixed bugs reported by Allan Bjorklund <allan@umich.edu>:
- ldap_close_connection is exported by OpenLDAP - changed to ldap_disconnect
- Missing ldap_connect() in getusergroups functions
- ldap_next_entry was being called too early while retrieving a sam_struct
- LDAP globals should be extern in sampassldap.c
* Fixed bugs reported by Martin Hofbauer <mh@bacher.at>
- Newly added workstation trust accounts had attributes DU rather than W.
- User dn's were forced to start with "uid=XX" rather than using the existing
dn.
Gerald Carter [Wed, 13 Jan 1999 00:48:25 +0000 (00:48 +0000)]
Fixed the "You password will expire in 0 days. Would you like to
change it now?" message when you login to a Samba Controlled domain.
The fix is a hard coded 42 days from right now until you need to
change you pasword again time (see passdb/sampassdb.c:pwdb_smb_to_sam())
Also fixed getsmbfilepwent() so that it will read in the last password
change time correctly.
* Related to this lib/util_pwdb.c:StrnCaseCmp() returns 0 if the
strings match. Chouldn't this be the pther way? Oh well. I
didn't change the return code as it was used in several
other cases (see lib/util_pwdb.c:pwdb_get_last_set_time())
Gerald Carter [Wed, 13 Jan 1999 00:40:04 +0000 (00:40 +0000)]
fixed an uninitialized variable in lookupsmbgrpgid() and
lookupsmbpwuid that was causing a SEGFAULT in smbd.
Christopher R. Hertel [Tue, 29 Dec 1998 21:16:08 +0000 (21:16 +0000)]
Updated the docs to match the changes I made to debug2html.
Chris -)-----
Christopher R. Hertel [Tue, 29 Dec 1998 20:43:01 +0000 (20:43 +0000)]
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 -)-----
Christopher R. Hertel [Tue, 29 Dec 1998 18:57:38 +0000 (18:57 +0000)]
First go at documentation for debug2html.
Chris -)-----
Christopher R. Hertel [Mon, 28 Dec 1998 22:34:08 +0000 (22:34 +0000)]
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.
John Terpstra [Sun, 27 Dec 1998 22:31:50 +0000 (22:31 +0000)]
Modified packaging-prep script to remove use of "rm -f *".
John Terpstra [Mon, 21 Dec 1998 10:12:27 +0000 (10:12 +0000)]
Changing to PHT standard SPEC settings.
Luke Leighton [Sun, 20 Dec 1998 00:37:24 +0000 (00:37 +0000)]
fix for potential lsass.exe crashing due to negative response from
LsaLookupNames being incorrect. this is a bit wierd: why would the
lsass.exe on the nt _client_ crash due to an LsaLookupNames response
from a samba _server_?
Luke Leighton [Sun, 20 Dec 1998 00:35:43 +0000 (00:35 +0000)]
adding start of remote lookup for domain member role.
Luke Leighton [Sun, 20 Dec 1998 00:31:18 +0000 (00:31 +0000)]
lib_sec_ctxt.o not .c
John Terpstra [Sat, 19 Dec 1998 03:29:03 +0000 (03:29 +0000)]
Updated makefile-path info contributed on the samba-technical mailing list.
Richard Sharpe [Sat, 19 Dec 1998 02:08:35 +0000 (02:08 +0000)]
Fixed problems in debug code because I did not compile
first :-(
Richard Sharpe [Sat, 19 Dec 1998 01:43:24 +0000 (01:43 +0000)]
Added some debugging to clitar ...
Jeremy Allison [Thu, 17 Dec 1998 22:44:56 +0000 (22:44 +0000)]
Fixed tar recurse bug.
Jeremy.
Jeremy Allison [Thu, 17 Dec 1998 21:41:28 +0000 (21:41 +0000)]
Fix bug with nmbd running wild due to recursion in retransmit_or_expire_response_records().
Jeremy.
Andrew Tridgell [Thu, 17 Dec 1998 01:04:38 +0000 (01:04 +0000)]
and in head branch:
make sure we include sys/mman.h if available
Christopher R. Hertel [Wed, 16 Dec 1998 18:50:54 +0000 (18:50 +0000)]
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 -)-----
Andrew Tridgell [Tue, 15 Dec 1998 03:16:24 +0000 (03:16 +0000)]
on Linux force fcntl/mmap based shared memory and on other systems
force IPC/shmem based shared memory.
Luke Leighton [Mon, 14 Dec 1998 21:22:59 +0000 (21:22 +0000)]
server_cryptkey() now calling cli_connectserverlist(). stupid microsoft
idiotic *SMBSERVER connectionism added to cli_connect_serverlist().
also added check for protocol < LANMAN2.
Luke Leighton [Mon, 14 Dec 1998 20:23:20 +0000 (20:23 +0000)]
added sid_name_use array argument to lsa_lookup_names and lsa_lookup_sids.
Luke Leighton [Mon, 14 Dec 1998 20:21:39 +0000 (20:21 +0000)]
trying to track down issues in get_home_dir().
Luke Leighton [Fri, 11 Dec 1998 19:27:19 +0000 (19:27 +0000)]
%U substitution should be unix user not nt user
Luke Leighton [Wed, 9 Dec 1998 23:16:37 +0000 (23:16 +0000)]
adding svcctl parsing code
Luke Leighton [Wed, 9 Dec 1998 18:59:12 +0000 (18:59 +0000)]
bugfix in smb_err_msg
Luke Leighton [Wed, 9 Dec 1998 16:30:37 +0000 (16:30 +0000)]
oops, util_pwdb.c appears to be included in PASSDB_OBJ not LIB_OBJ.
Luke Leighton [Wed, 9 Dec 1998 16:28:04 +0000 (16:28 +0000)]
adding some enumerate services code, client and server.
Luke Leighton [Wed, 9 Dec 1998 16:23:57 +0000 (16:23 +0000)]
need to initialise global_myworkgroup
Andrew Tridgell [Wed, 9 Dec 1998 06:35:37 +0000 (06:35 +0000)]
removed the SID stuff from the head branch as well.
This allows the removal of PASSDB_OBJ, RPC_CLIENT_OBJ and
RPC_PARSE_OBJ from nmbd in the head branch.
so nmbd just went on a diet :)
Luke Leighton [Tue, 8 Dec 1998 23:29:37 +0000 (23:29 +0000)]
adding "Service Control Manager" commands to rpcclient.
Jeremy Allison [Tue, 8 Dec 1998 02:25:41 +0000 (02:25 +0000)]
Adding George's Mac extension code.
Jeremy.
Jeremy Allison [Tue, 8 Dec 1998 02:22:56 +0000 (02:22 +0000)]
Adding George's Mac extension include files.
Jeremy.
Luke Leighton [Tue, 8 Dec 1998 00:33:05 +0000 (00:33 +0000)]
ldap_getpw() also needs to be (void)
Luke Leighton [Tue, 8 Dec 1998 00:30:23 +0000 (00:30 +0000)]
compilation warnings due to missing (void) in ldap_close_connection.
Luke Leighton [Tue, 8 Dec 1998 00:25:04 +0000 (00:25 +0000)]
adding srvsvc pipe.
Luke Leighton [Mon, 7 Dec 1998 22:52:49 +0000 (22:52 +0000)]
added ldap files by Matthew Chapman.
Luke Leighton [Mon, 7 Dec 1998 22:52:13 +0000 (22:52 +0000)]
Matthew Chapman spotted that smbpasschange was assuming the existence
of a private/smbpasswd file, this will not be the case for other
database APIs. removed startsmbdb and endsmbpwdb calls because
add_smbpwd_entry() and mod_smbpwd_entry() don't need them.
Andrew Tridgell [Mon, 7 Dec 1998 22:43:43 +0000 (22:43 +0000)]
fixed warnings (and potential errors) due to integer overflow when
creating locking masks
Luke Leighton [Mon, 7 Dec 1998 21:48:58 +0000 (21:48 +0000)]
added text and html versions of LDAP.yo. smb.conf.5 not generated yet
because there were parts rejected from the ldap patch file.