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

2091 Commits

Author SHA1 Message Date
Luke Leighton
ce1ae86cbd comma after DOM_MAP_USER removed 0001-01-01 00:00:00 +00:00
Matthew Chapman
af83778abc Must set password length to 24 after we encrypt a password. 0001-01-01 00:00:00 +00:00
Matthew Chapman
1e3873111f 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?).
0001-01-01 00:00:00 +00:00
Matthew Chapman
e9c79c85e6 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);
  ... )
0001-01-01 00:00:00 +00:00
Matthew Chapman
e1e3875057 Added init_nt_time function which initialises an NTTIME to -1. 0001-01-01 00:00:00 +00:00
Michael Warfield
c5608093e4 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...
0001-01-01 00:00:00 +00:00
Luke Leighton
ad58cdfac6 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
6d14db6a6c removed encrypt-password code pre-cli_session_setup(), session setup
fn decides whether to encrypt password or not.
0001-01-01 00:00:00 +00:00
Luke Leighton
14080a564a uni_svc_name not uni_srv_name 0001-01-01 00:00:00 +00:00
Luke Leighton
a022710f1e rpcclient "Service Control Manager" svcenum [-i] command. 0001-01-01 00:00:00 +00:00
Luke Leighton
61c40982d6 error code cleanup 0001-01-01 00:00:00 +00:00
Luke Leighton
17f4c5a785 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
f4dd8f6b56 Service Control Manager - service enumeration. 0001-01-01 00:00:00 +00:00
Luke Leighton
0ed70972d7 set_port warning / unused / global/local variable overlap issues
cmd_svcctl.c tests got put into cvs by mistake.
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
0681f6946b Fuss fuss fuss.
Added missing default: statements to two switch blocks.

Chris -)-----
0001-01-01 00:00:00 +00:00
Luke Leighton
2a509e9606 - 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
0001-01-01 00:00:00 +00:00
Luke Leighton
03967986ec compilation errors due to addition of smb file handle parameter. 0001-01-01 00:00:00 +00:00
Richard Sharpe
f6c7819266 Putting back the -p flag in smbclient.
However, it seems that the -s flag
in smbclient is also ignored :-(
0001-01-01 00:00:00 +00:00
Richard Sharpe
3598d90a32 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 ...
0001-01-01 00:00:00 +00:00
Richard Sharpe
524c4d2978 Fixing up configure to properly support ssl 0001-01-01 00:00:00 +00:00
Richard Sharpe
fb6048bb86 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
0001-01-01 00:00:00 +00:00
Matthew Chapman
63d7822b9d 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.
0001-01-01 00:00:00 +00:00
Matthew Chapman
f530e289c6 Added load_interfaces in smbpasswd to allow name resolution by broadcast and
multiple interfaces. (Jeremy already committed this in SAMBA_2_0).
0001-01-01 00:00:00 +00:00
Richard Sharpe
57301a3eb4 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 :-)
0001-01-01 00:00:00 +00:00
Matthew Chapman
15bd172530 eclass != ERRDOS && num != ERRmoredata
is not the same as
!(eclass == ERRDOS && num == ERRmoredata)

This was causing smbclient to segfault on receiving certain errors.
0001-01-01 00:00:00 +00:00
Matthew Chapman
2b6f481885 Fixed typo in srv_samr.c where samr_add_groupmem and samr_del_groupmem were
the wrong way around.
0001-01-01 00:00:00 +00:00
Matthew Chapman
91c77f5432 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.
0001-01-01 00:00:00 +00:00
Gerald Carter
175e598dcc 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())
0001-01-01 00:00:00 +00:00
Gerald Carter
cabc7e739c fixed an uninitialized variable in lookupsmbgrpgid() and
lookupsmbpwuid that was causing a SEGFAULT in smbd.
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
300a8c9e50 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 -)-----
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
d2d6f0bf36 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
a15a3f95f2 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_?
0001-01-01 00:00:00 +00:00
Luke Leighton
090512e187 adding start of remote lookup for domain member role. 0001-01-01 00:00:00 +00:00
Luke Leighton
2485b8e706 lib_sec_ctxt.o not .c 0001-01-01 00:00:00 +00:00
Richard Sharpe
47e36bed8f Fixed problems in debug code because I did not compile
first :-(
0001-01-01 00:00:00 +00:00
Richard Sharpe
b75af70990 Added some debugging to clitar ... 0001-01-01 00:00:00 +00:00
Jeremy Allison
7be5c8e8f7 Fixed tar recurse bug.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d5f05b4fae Fix bug with nmbd running wild due to recursion in retransmit_or_expire_response_records().
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
ccf6443887 and in head branch:
make sure we include sys/mman.h if available
0001-01-01 00:00:00 +00:00
Christopher R. Hertel
782474f41e 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 -)-----
0001-01-01 00:00:00 +00:00
Andrew Tridgell
ef5f752a4a on Linux force fcntl/mmap based shared memory and on other systems
force IPC/shmem based shared memory.
0001-01-01 00:00:00 +00:00
Luke Leighton
c2bcb3a286 server_cryptkey() now calling cli_connectserverlist(). stupid microsoft
idiotic *SMBSERVER connectionism added to cli_connect_serverlist().
also added check for protocol < LANMAN2.
0001-01-01 00:00:00 +00:00
Luke Leighton
0b2095e092 added sid_name_use array argument to lsa_lookup_names and lsa_lookup_sids. 0001-01-01 00:00:00 +00:00
Luke Leighton
2cce78aa00 trying to track down issues in get_home_dir(). 0001-01-01 00:00:00 +00:00
Luke Leighton
f4b8a28306 %U substitution should be unix user not nt user 0001-01-01 00:00:00 +00:00
Luke Leighton
c6f2f58c74 adding svcctl parsing code 0001-01-01 00:00:00 +00:00
Luke Leighton
870bccb174 bugfix in smb_err_msg 0001-01-01 00:00:00 +00:00
Luke Leighton
ca10eb4490 oops, util_pwdb.c appears to be included in PASSDB_OBJ not LIB_OBJ. 0001-01-01 00:00:00 +00:00
Luke Leighton
dacf5b152b adding some enumerate services code, client and server. 0001-01-01 00:00:00 +00:00
Luke Leighton
501617307f need to initialise global_myworkgroup 0001-01-01 00:00:00 +00:00