1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

49 Commits

Author SHA1 Message Date
Andrew Tridgell
fe4ef4bbef make SWAT obey the global "hosts allow" and "hosts deny" settings.
any attempt to run swat from a host that is disallowed will give an
error.
-
Jeremy Allison
631913ea85 smbd/password.c: Added *SMBSERVER fix is name is too long.
web/swat.c: Changed '?' to help.
Jeremy.
-
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.
-
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.
-
Andrew Tridgell
8e8ab4df1f - new prototypes
- much as I hate doing it I've removed the "commit changes" button for
  users that don't have write access to smb.conf (Jeremy insisted)
-
Andrew Tridgell
ab35d99e52 allow all user to view the config -
Andrew Tridgell
55377e3cdd remove code that allows installation via cgi
swat will now give an error message if run via cgi
-
Jeremy Allison
4c2b5a0098 Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE.
groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf.
include/includes.h: Fix YP problem.
include/smb.h: Fix ZERO_STRUCTP.
lib/util_sock.c: Added strerror() in debugs.
passdb/ldap.c: Don't use snprinf, use slprintf.
rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf.
script/installman.sh: DGUX changes.
smbd/open.c smbd/oplock.c: Fixed gcc warnings.
web/swat.c: Changes USER to SWAT_USER.
-
Andrew Tridgell
b93f686655 %\ is an interesting printf argument, but I prefer %s -
Herb Lewis
48af29bcc9 Removed code that used printf/fprintf in password changin libraries.
Now passes strings instead.
-
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.
-
Herb Lewis
e3fc90d0b5 changes from John Sygulla for changing remote passwords -
Andrew Tridgell
ee60d9a289 handle null usernames -
Andrew Tridgell
d076daaaf8 show all buttons in demo mode -
Andrew Tridgell
530a98022e fixed demo mode -
Andrew Tridgell
49bf197103 extracted the password change code from smbpasswd and used it in swat
instead of opening pipes and other horrible stuff.
-
Jeremy Allison
7d55bf3791 Added the security changes suggested by Andrew - become the
user that authenticated to swat permanently (if not root).
Jeremy.
-
Jeremy Allison
43ddc85779 Added enable user button. Fixed bug where log was always printed.
Jeremy.
-
Andrew Tridgell
52f47b8d2e changed is_root() to am_root() to prevent clash with variable names. -
Jeremy Allison
80e0f7e107 rpc_server/srv_netlog.c: Fixed crash bug with ACB_PWNOTREQ.
script/makeyodldocs.sh: Added code to make text docs for non-man page YODL docs.
web/cgi.c web/swat.c: SGI compiler warnings fixed.
Jeremy.
-
Herb Lewis
06d4026cf1 added password change functionality to swat -
Herb Lewis
9f250a80c6 swat.c updated to use new yodl generated smb.conf.5.html file for help
added smb.conf.5.html to swat/help
-
Alexandre Oliva
9a5bdf5c1b replace getpass() with getsmbpass() if getsmbpass.c compiles -
Andrew Tridgell
ddb788c24d use /swat/ prefix in both inetd and cgi modes, to enable a static header.html -
Andrew Tridgell
d35c6e8098 spruced up SWAT a bit - it now uses the new Samba logo at the top and
a table to give it a little border
-
Andrew Tridgell
b088c804f9 this checkin gets rid of the global Files[] array and makes it local
in files.c

it should now be faily easy to expand the default MAX_OPEN_FILES to
many thousands.
-
Andrew Tridgell
c7ee025ead this is the bug change to using connection_struct* instead of cnum.
Connections[] is now a local array in server.c

I might have broken something with this change. In particular the
oplock code is suspect and some .dll files aren't being oplocked when
I expected them to be. I'll look at it after I've got some sleep.
-
Andrew Tridgell
6b0c1733d2 changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.

This should prevent any sprintf based security holes.
-
Jeremy Allison
61c1dbb978 clitar.c: #ifdef'ed out all the bits that were giving 'defined but not used'
messages.
nttrans.c: More updates.
smb.h: Removed stuff that didn't belong in the smb_passwd struct. Persuaded Luke
       to use a new structure.
web/swat.c: Fixed gcc complaints about shadowing global 'string'.
Jeremy.
-
Herb Lewis
a6edde4f00 The globals section now shows non-default variables (like the
view config section does) in the basic view. There is also a
reset button to undo all changes you have made (that haven't
been committed). In addition each field now has a "Set Default"
button. Multi-choice fields are now select fields instead of
a set of radio buttons.

On the status screen I added a "restart" option for stopping then
starting smbd and nmbd.
-
Jeremy Allison
5d3e874d78 Added patch from Bruce Tenison <btenison@dibbs.net> to allow encrypted
passwords to be stored over time, allowing a smbpasswd file migration.
Adds new parameter "update encrypted".
Will also add to 1.9.18 branch.
Docs update to follow.
Jeremy.
-
Andrew Tridgell
112cf61cb6 don't set the Expires header on any page generated from a POST. This
stops the "POST data has expired" problem when using the back button
in netscape.
-
Andrew Tridgell
b92c3b13d7 oops, I got the sense of the show_defaults parameter to lp_dump()
wrong.
-
Andrew Tridgell
a776058900 this isn't a big commit, it just looks like it :-)
I needed the client_name() and client_addr() functions in swat so I
could tell who was connecting from where. The problem was that these
functions didn't take a file descriptor parameter they just used
the global "Client".

So I needed to change all calls to pass a parameter ... lots of files.
-
Andrew Tridgell
4488d8932f - added "Full View"/"Normal View" on the "view config" page
- added the ability to auto-refresh the status page. There is a
  problem with this (it can kill inetd!). Hopefully we can fix that.
-
Andrew Tridgell
abd4a17e21 - added the ability to kill off individual connections from SWAT (from
the status page)
- split the claim_connection() code into its own file
- fixed the claim_connection() code to lock the file when manipulating
  it
- always claim a null connection at startup
- fixed a bug in the pidfile code
-
Andrew Tridgell
bcec95740f a smaller background -
Andrew Tridgell
57f4dfcbf3 added a background image based on Pauls SAMBA logo but manipulated a
little with GIMP
-
Andrew Tridgell
20bb22d61b added the ability to start/stop the server from SWAT.
I needed to modify the way the pidfile is handled in nmbd and smbd to
do this. Jeremy, you may wish to look at what I've done as it probably
breaks the Whistle use of pidfiles. In particular I've removed the -f
option and instead smbd and nmbd always create a pidfile in the lock
directory.
-
Andrew Tridgell
b0e1183b2c if a local parameter is changed at the global level then propogate the
change to all shares that are currently set to the default value.
-
Andrew Tridgell
486a059fe1 - added separators
- added "view config" button
-
Andrew Tridgell
6e2248532a another fix for running under cgi-bin -
Andrew Tridgell
9dbfb16990 fixed support for running swat via cgi-bin -
Andrew Tridgell
8e4a412dba added status page to SWAT. Similar to smbstatus output but in a HTML
table
-
Andrew Tridgell
60ef0b31a0 added a "home" icon -
Andrew Tridgell
b6055e40bb added Date and Expires headers in the mini web server so clients know
what they can cache.
-
Andrew Tridgell
2b4204a776 - remove redundent strstr()
- don't show printers in shares page
-
Andrew Tridgell
6e1237568b allow for non-authenticated SWAT for demo purposes -
Andrew Tridgell
674c88a6bf Jeremy is going to hate me ...
These are some hacks on SWAT. Maybe users will actually be able to
work out how to use it now.

Unfortunately these changes required some editing in loadparm.c and
smb.h which will make Jeremys merge job harder. Sorry!
-