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

197 Commits

Author SHA1 Message Date
Luke Leighton
870bccb174 bugfix in smb_err_msg 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
9bce7340d6 ERRmoredata is an acceptable error code, it is not an error. 0001-01-01 00:00:00 +00:00
Luke Leighton
603c5f6df8 another attempt at a fix on connect_serverlist()... 0001-01-01 00:00:00 +00:00
Luke Leighton
c0efc35b27 andrej spotted problem with connect_serverlist (starts off assuming
a connection succeeds...).
0001-01-01 00:00:00 +00:00
Tim Potter
c44b418d6f Replaced ZERO_STRUCT() with ZERO_STRUCTP() in cli_connect_serverlist().
Fix by Matt Chapman <m.chapman@student.unsw.edu.au>
0001-01-01 00:00:00 +00:00
Jeremy Allison
5ad77769be Changes to make the default prefix /usr/local/samba - as it was in 1.9.18p10.
acconfig.h configure configure.in include/config.h.in: Fixes to DEC OSF1.
libsmb/nmblib.c: Fixes to nmbd jumps in scope names.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
18ff93a9ab 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.
0001-01-01 00:00:00 +00:00
Luke Leighton
0d21e1e609 - 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
67ba0b1ce3 fixed lmhosts parsing. We were using sizeof(name) where name was char* 0001-01-01 00:00:00 +00:00
Andrew Tridgell
dddf1d8522 automatically uppercase server and share names (win95 won't handle
lowercase share names!)
0001-01-01 00:00:00 +00:00
Jeremy Allison
9ee8f39aed Removed acconfig.h configure configure.in include/config.h.in: Made smbwrapper not made
by default.
nmbd*: Changed all calls to namestr() to nmbd_namestr() to fix broken FreeBSD include
	   file problem...sigh.
Jeremy.
0001-01-01 00:00:00 +00:00
Herb Lewis
48af29bcc9 Removed code that used printf/fprintf in password changin libraries.
Now passes strings instead.
0001-01-01 00:00:00 +00:00
Herb Lewis
3c45a3503e .cvsignore: Removed old entries.
client/client.c:
include/client.h: Added some debug messages that the old client used to
		  generate. These are needed to make scripts such as
		  'findsmb' work - there may be other changes to keep
		  backwards output compatibility. Do we need a -old-client-compat
		  argument ?
libsmb/clientgen.c: Fixed crash bug where malloc'ed data wasn't being
		    cleared - corrupted malloc chains.
web/swat.c: John's changes to get rid of "ghost" table entries.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
49bf197103 extracted the password change code from smbpasswd and used it in swat
instead of opening pipes and other horrible stuff.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
713864dd03 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
45131501f2 Moved some code (NTLMSSPcalc) out of smbdes and inline for paranioa
resons and my own piece of mind...
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
bacd3e9d20 Makefile.in: Removed rpc_server/srv_ldap_helpers.c per J.F.'s instructions.
client/client.c:
client/clitar.c:
include/client.h:
smbwrapper/smbw_dir.c:
smbwrapper/smbw_stat.c:
smbwrapper/smbw.c:
lib/util.c: Converted all use of 'mode' to uint16.
smbd/quotas.c: Fixed stupid comment bug I put in there :-(.
printing/printing.c: Fix from J.F. to new code.
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
e14ca7765a 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?
0001-01-01 00:00:00 +00:00
Jeremy Allison
b5981c0149 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.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
86f98e0607 don't bother trying QFILEINFO/QUERY_FILE_ALL_INFO with win95 as it
totally screws it up, giving garbage for the size fields.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
b2a7f85d59 added a couple more error codes to cli_error() 0001-01-01 00:00:00 +00:00
Andrew Tridgell
2565ccf9de 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.
0001-01-01 00:00:00 +00:00
Jeremy Allison
7feaa13d02 Removed previously #ifdef 0 'ed code.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
d891421d16 libsmb/smbdes.c: #ifdef'ed out code prior to removal.
rpc_client/cli_pipe.c: Inlined code removed from smbdes.c
rpc_server/srv_samr.c: Fixed unused variable warning.
rpc_server/srv_util.c: Inlined code removed from smbdes.c

Luke - the above changes are the first part of the changes
you and I discussed as being neccessary at the CIFS conference.
*PLEASE REVIEW THESE CHANGES* - make sure I haven't broken
any of the authenticated DCE/RPC code.

smbd/nttrans.c: Fixed to allow NT5.0beta2 to use Samba shares
                with NT SMB support.
smbd/open.c: Fixed mkdir when called from nttrans calls.
smbd/server.c: Set correct size for strcpy of global_myworkgroup.

Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
fcfb40d2b0 - dce/rpc code
- removed debug info in struni2 and unistr2 (security risk)

- rpc_pipe function was getting pointer to data then calling realloc *dur*

- password check function, the start of "credential checking",
  user, wks, domain, pass as the credentials (not just user,pass which
  is incorrect in a domain context)

- cli_write needs to return ssize_t not size_t, because total can be -1
  if the write fails.

- fixed signed / unsigned warnings (how come i don't get those any more
  when i compile with gcc???)

- nt password change added in smbd.  yes, jeremy, i verified that the
  SMBtrans2 version still works.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
5f96328d32 improved session reestablishment 0001-01-01 00:00:00 +00:00
Andrew Tridgell
4e3f8ef41b return the resolved IP on a cli_connect() call so it can be cached 0001-01-01 00:00:00 +00:00
Jeremy Allison
60dc1a4a00 Small tidyups for gcc in 'preen' mode....
Jeremy.
0001-01-01 00:00:00 +00:00
Andrew Tridgell
2f39409dc1 - use large buffers for netshareenum
- handle errmoredata a bit better
- fix dev type from tconx for smbw
0001-01-01 00:00:00 +00:00
Jeremy Allison
514e52e4b4 trans2.h: Added Thursby MAC extension.
smbd/trans2.c: Added Thursby MAX extension.
libsmb/clientgen.c: Fixed smbtorture lock code.
Jeremy.
0001-01-01 00:00:00 +00:00
Luke Leighton
60c0f22a4e rpcclient interactive login (with trust account changing if you are root)
cli_session_setup handles null sessions correctly
0001-01-01 00:00:00 +00:00
Andrew Tridgell
53805112f1 set recursion desired for bcast name query 0001-01-01 00:00:00 +00:00
Luke Leighton
ed6ffa4430 16 changed to 8 by mistake in samoemhash. 0001-01-01 00:00:00 +00:00
Luke Leighton
29434bf195 warnings spotted by ./configure.developer options 0001-01-01 00:00:00 +00:00
Luke Leighton
69f5f9f889 dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
dfb48aab61 dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
8a7ac4a25d dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
e0445419b2 dce/rpc. 0001-01-01 00:00:00 +00:00
Luke Leighton
caeb99201a basic client-side ntcreateX function (hard-wired values except filename) 0001-01-01 00:00:00 +00:00
Luke Leighton
32d0f5e4a5 dce/rpc 0001-01-01 00:00:00 +00:00
Luke Leighton
62fdeef1b7 dce/rpc 0001-01-01 00:00:00 +00:00
Andrew Tridgell
35a5e9ce4f fixed bug pointed out by Herb. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
c0dc8e87f0 - don't generate 0 params in torture
- handle 0 params in ipc.c
0001-01-01 00:00:00 +00:00
Andrew Tridgell
91597c12fb - 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
0001-01-01 00:00:00 +00:00
Andrew Tridgell
349469221a use 1 second resolution calls if possible 0001-01-01 00:00:00 +00:00
Luke Leighton
6677b888bd dce/rpc 0001-01-01 00:00:00 +00:00
Andrew Tridgell
0ee3e0c623 do an anonymous login if the username/password is rejected. 0001-01-01 00:00:00 +00:00
Andrew Tridgell
e751690127 fixed rename error code from NT servers 0001-01-01 00:00:00 +00:00
Andrew Tridgell
a5c18f9c82 implemented unix semantics for rename in smbwrapper 0001-01-01 00:00:00 +00:00