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

137 Commits

Author SHA1 Message Date
Tim Potter
bda419be61 Grr - fixed compile error in smbwrapper stuff.
(This used to be commit 11a7c5e3d6)
2001-04-16 02:42:10 +00:00
Tim Potter
3e24c65101 Added a caching system to smbsh. Previously access to workgroup or server
directories under /smb generated net share enum or net server enum calls.
For large networks this could result in bad performance.  We now cache these
results and only call net * enums after the cache timeout has exceeded.
(This used to be commit 1e38eef54d)
2001-04-12 05:53:07 +00:00
Jeremy Allison
6578fd8742 To stop people complaining about the mktemp call, move it into lib/util.c. Thanks
to Andrew for all this code. Fixed extra line in lib/sysacls.c that broke
XFS ACL code.
Jeremy.
(This used to be commit 9b32b8a8cf)
2001-04-11 23:19:08 +00:00
Andrew Tridgell
751ba9d051 setup workgroup when found
(This used to be commit 33aefc76e8)
2001-02-20 10:13:48 +00:00
Tim Potter
b3ccabeece Fix for no master browser present.
(This used to be commit 24c78fdf5f)
2001-01-16 17:48:39 +00:00
Tim Potter
99f3694436 Compile fix for smbw_dir_add function.
(This used to be commit d7920a670b)
2001-01-15 17:46:02 +00:00
Richard Sharpe
dca808cbc4 Needed a callback arg on cli_list ...
(This used to be commit d45e667a74)
2001-01-05 13:11:29 +00:00
Tim Potter
e70b103fff Added extra argument to calls to smbw_share_add()
(This used to be commit d006e6adca)
2001-01-05 00:17:36 +00:00
Richard Sharpe
92ebc81734 I need a callback arg for cli_NetServerEnum and cli_RNetShareEnum, so I had
to modifiy any routine that calls it to pass NULL and so forth.

Should have no impact. It compiles OK.
(This used to be commit 7f862e387f)
2001-01-04 11:35:55 +00:00
Tim Potter
8bb17e9de5 Return an empty directory for a stat on a share we aren't allowed to
connect to.  This gives a permission denied when a cd is attempted, but
not a permission denied in the directory listing one level up.
(This used to be commit 9255e52624)
2001-01-02 23:42:36 +00:00
Andrew Tridgell
abb9a2de72 implemented a much nicer name_status() interface. It now returns a
list of structures rather than the dodgy parsing code we had before

this also gets smbw working correctly with no initial workgroup (using
name_status_find on __MSBROWSE__ returns)
(This used to be commit f2be88a873)
2000-12-20 03:22:51 +00:00
Tim Potter
a56ca9e2a4 Added support for SERVICESF shared variable to change configuration file
used in lp_load().
(This used to be commit 4d80ee4f41)
2000-12-13 04:19:48 +00:00
Andrew Tridgell
452d050297 added support for browsing the list of workgroups at the top level in
smbw
(This used to be commit 8f97d59186)
2000-12-11 00:09:06 +00:00
Tim Potter
8f338ee3dd Fetch authentication info before actually using it.
(This used to be commit 600eb0eb00)
2000-11-11 01:21:31 +00:00
Tim Potter
ae7911e4d8 Added a authentication hook to smbwrapper which allows a (username,
workgroup, password) tuple to be provided by another function.
(This used to be commit 644c78d64a)
2000-11-01 04:31:19 +00:00
Andrew Tridgell
d0f1bca957 added -L option
(This used to be commit ae80ca637c)
2000-07-06 03:39:11 +00:00
Andrew Tridgell
16e4503cca got smbw to compile again on Linux
(This used to be commit 614fd4119c)
2000-07-06 02:28:44 +00:00
Herb Lewis
a36d737c88 removed extra arguements from make_nmb_name calls
(This used to be commit d97f5d57d0)
2000-03-16 17:58:08 +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
Tim Potter
0132160229 Return a (void *)0 instead of NULL in readdir64() wrapper.
(This used to be commit d78224a7d2)
1999-06-13 04:27:57 +00:00
Tim Potter
74e19e5b81 Return a #error if no functions could be found to wrap around.
(This used to be commit 36f9ce7993)
1999-06-13 04:26:58 +00:00
Luke Leighton
5a9859c7b0 removed encrypt-password code pre-cli_session_setup(), session setup
fn decides whether to encrypt password or not.
(This used to be commit 6d14db6a6c)
1999-01-29 19:31:52 +00:00
Luke Leighton
4af8d7aa29 - 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
(This used to be commit 2a509e9606)
1999-01-27 00:08:33 +00:00
Luke Leighton
801d625898 issues spotted by herb.
(This used to be commit 57e0254946)
1998-12-07 21:40:53 +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
Andrew Tridgell
58e14b7c0b add a error code when failed to get lock
(This used to be commit 05696b4bbf)
1998-11-21 01:26:45 +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
Andrew Tridgell
2db96e3047 fixes for OSF1 compilation
(This used to be commit 5be3c37f50)
1998-11-13 03:37:01 +00:00
Jeremy Allison
e4f974c611 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.
(This used to be commit bacd3e9d20)
1998-11-09 20:33:37 +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
Herb Lewis
950e47cb75 some versions of Irix pass the HAVE__ACL test but don't have acl.h
test for both before including ACL support.
(This used to be commit 86743dfda4)
1998-10-29 01:13:46 +00:00
Andrew Tridgell
c90d22c6c5 handle the case of an intermediate binary not loading smbwrapper.so
(for example /usr/bin/man because it is setgid).
(This used to be commit 85f639ab2b)
1998-10-24 08:14:17 +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
Andrew Tridgell
4140f2bfc1 make sure that apps can't close one of the internal smbw file
descriptors by catching close attempts on those fds and returning
EBADF.
(This used to be commit 9d863fb168)
1998-10-24 06:36:22 +00:00
Andrew Tridgell
8c87f61e99 don't use SMBW_PWD_ENV any more
(This used to be commit 252fe1e701)
1998-10-23 01:29:38 +00:00
Andrew Tridgell
517806e676 fixed problems with PWD - we no longer use the PWD env variable
instead the shared variable area is used.

this fixes problems with /bin/sh under solaris
(This used to be commit 4eb7b5c6a8)
1998-10-23 01:27:23 +00:00
Andrew Tridgell
d6ad9474b2 make the shared variable stuff slightly more sophisticated
(This used to be commit 636182f183)
1998-10-23 01:26:46 +00:00
Jeremy Allison
80f920181f server/srv_samr.c smbd/ipc.c: Changed global_myworkgroup back to fstring
(as it is everywhere else).
smbwrapper/smbsh.c: For IRIX n32 binaries, set _RLDN32_LIST not _RLD32_LIST.
                    Exec users preferred shell is SHELL environment variable is set.
tests/fcntl_lock.c: Added sys/types.h for systems that need this.
Jeremy.
(This used to be commit 50413d0d81)
1998-10-22 18:51:16 +00:00
Andrew Tridgell
2a0141c50f oops, I ot the return type of putenv() wrong
(This used to be commit 5b7b24d3f9)
1998-10-20 06:52:39 +00:00
Andrew Tridgell
26b299dd52 use putenv() more portably
(This used to be commit dc08f1a5c9)
1998-10-20 06:51:21 +00:00
Andrew Tridgell
ad64fc6bc5 removed setenv(), replaced with smbw_setenv()
(This used to be commit 72bce217ef)
1998-10-20 06:45:18 +00:00
Jeremy Allison
60cf45b2bc smbd/nttrans.c smbd/trans2.c: First fixes for NT5.0beta2. That redirector
has some *horrible* bugs !
smbwrapper/shared.c smbwrapper/smbsh.c smbwrapper/smbw.c: Fixed gcc warnings.
Jeremy.
(This used to be commit 76448d1d82)
1998-10-20 03:17:43 +00:00
Andrew Tridgell
33790c4150 added command line options to smbsh
(This used to be commit 9b249c075e)
1998-10-19 02:49:48 +00:00
Andrew Tridgell
f08565a834 - don't use env variables for passwords and usernames (yeah!)
- added a shared variable area based on a unlinked open file, and
  implement a general get/set interface to it
- cache hostname lookups and master ip lookups in shared variable area
(This used to be commit 279cbe69ef)
1998-10-19 01:03:00 +00:00
Jeremy Allison
fc62d6bf36 Small tidyups for gcc in 'preen' mode....
Jeremy.
(This used to be commit 60dc1a4a00)
1998-10-17 17:41:13 +00:00
Andrew Tridgell
56c5dc7de1 changed some debug levels
(This used to be commit 121e321a12)
1998-10-16 23:05:19 +00:00
Jeremy Allison
f3793be165 Re-added code to tell the user how many open files they
have. Needed for server diagnosis purposes...
Jeremy.
(This used to be commit 04d79a9ae5)
1998-10-16 06:16:10 +00:00
Luke Leighton
5a9a3ab344 tridge, i had to put a #ifdef _STAT_VER_LINUX_OLD round a bit of code
that didn't have _STAT_VER_LINUX_OLD defined.  maybe you want to sort
this out properly...
(This used to be commit aa9dd697d4)
1998-10-14 07:16:00 +00:00
Andrew Tridgell
7761e07197 smbsh launch program is now in C
(This used to be commit 784b1590c8)
1998-10-13 08:27:28 +00:00
Luke Leighton
8158620124 dce/rpc.
(This used to be commit e0445419b2)
1998-10-09 20:17:11 +00:00