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

73 Commits

Author SHA1 Message Date
Andrew Tridgell
b12a4dd9b6 declare dbf in one spot
(This used to be commit f41c3bb80f)
2001-09-10 12:14:18 +00:00
Andrew Tridgell
b30e75692d replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down
replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor
limit that we hit with nasty consequences on some systems

I would eventually prefer us to have a configure test to see if we need
to replace stdio, but for now this code needs to be tested widely so
I'm enabling it by default.
(This used to be commit 1af8bf34f1)
2001-09-10 11:08:57 +00:00
Andrew Tridgell
65c5a1c0ba convert more code to using d_printf
(This used to be commit 60d2973034)
2001-09-08 02:59:23 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Simo Sorce
2b8e2f16c3 uhm some pointer went wrong
(This used to be commit d0acacfc9d)
2001-06-23 15:27:04 +00:00
Simo Sorce
5be670074e handle P_LIST parameters
(This used to be commit 26ab608c91)
2001-06-23 15:01:34 +00:00
Andrew Tridgell
8bfcdd723d make swat recover from previously bad umask from xinetd
(This used to be commit 045d7e1b16)
2001-05-30 06:12:21 +00:00
Tim Potter
aded7fc858 Add border=0 in included swat images to get rid of the link border stuff.
Much prettier looking.
(This used to be commit 16031364a8)
2001-05-30 03:02:47 +00:00
Andrew Tridgell
5e6bbdb74e make sure the umask is set in swat
(This used to be commit 07c74fe83f)
2001-05-28 23:56:56 +00:00
Gerald Carter
71ef4e0183 fix broken links in SWAT due to upper case anchors in the generated
HTML man pages.  Spotted by Herb.
(This used to be commit be45c82c3a)
2001-04-12 05:24:57 +00:00
Jeremy Allison
72aa0d8073 Setup syslog correctly in swat. Patch from Andrew Bartlett.
Jeremy.
(This used to be commit ffd9bf1922)
2001-04-05 21:31:12 +00:00
Jeremy Allison
1452c2d8c4 Fix from Ryo Kawahara <rkawa@lbe.co.jp> to make SWAT correctly write and smb.conf
file in utf8.
Jeremy.
(This used to be commit 42052d6079)
2001-03-26 23:13:02 +00:00
Jeremy Allison
da3053048c Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
(This used to be commit 0be41d5158)
2001-03-11 00:32:10 +00:00
David O'Neill
792ca5d989 Changes from APPLIANCE_HEAD:
source/rpc_server/srv_spoolss_nt.c
        - Unrolled construct_notify_jobs_info() loop to only fetch
          printer info_2 structure once rather than num_print_jobs times.
        - convert command to unix codepage.
        - remove lp_remove_service() call as it prevents lp_killservice()
          from working.
        - Modified some DEBUG and DEBUGADD statements.

    source/param/loadparm.c
    source/param/params.c
        - change printer, preload, auto services to FLAG_DOS_STRING,
          reverted earlier changes to szPrintername et al, add comments.

    source/printing/load.c
        - fix bug with lp_auto_services() and strtok()

    source/printing/nt_printing.c
    source/printing/printing.c
        - remove redundant test that used SERVICE(snum)

    source/printing/pcap.c
        - add unix_to_dos() calls, add notes wrt FIXMEs for
          xxx_printer_fn() functions.

    source/web/swat.c
        - added FIXME comment.

    source/smbd/service.c
        - added comment re: dos codepage
(This used to be commit 7b774b72c2)
2001-01-17 18:47:46 +00:00
Gerald Carter
9fede0dc0d Large commit which restructures the local password storage API.
Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+)
are broken, but they were somewhat broken before. :)

The following functions implement the storage manipulation interface

/*The following definitions come from  passdb/pdb_smbpasswd.c  */

BOOL pdb_setsampwent (BOOL update);
void pdb_endsampwent (void);
SAM_ACCOUNT* pdb_getsampwent (void);
SAM_ACCOUNT* pdb_getsampwnam (char *username);
SAM_ACCOUNT* pdb_getsampwuid (uid_t uid);
SAM_ACCOUNT* pdb_getsampwrid (uint32 rid);
BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass);
BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override);
BOOL pdb_delete_sam_account (char* username);

There is also a host of pdb_set..() and pdb_get..() functions for
manipulating SAM_ACCOUNT struct members.  Note that the struct
passdb_ops {} has gone away.  Also notice that struct smb_passwd
(formally in smb.h) has been moved to passdb/pdb_smbpasswd.c
and is not accessed outisde of static internal functions in this
file.  All local password searches should make use of the the SAM_ACCOUNT
struct and the previously mentioned functions.

I'll write some documentation for this later.  The next step is to fix
the TDB passdb backend, then work on spliting the backends out into
share libraries, and finally get the LDAP backend going.

What works and may not:

	o domain logons from Win9x 	works
	o domain logons from WinNT 4	works
	o user and group enumeration
		as implemented by Tim	works
	o file and print access		works
	o changing password from
		Win9x & NT		ummm...i'll fix this tonight :)

If I broke anything else, just yell and I'll fix it.  I think it
should be fairly quite.





-- jerry
(This used to be commit 0b92d0838e)
2000-11-13 23:03:34 +00:00
Andrew Tridgell
4aae2b3702 don't show equivalent enum options in swat
(This used to be commit 5207496097)
2000-09-13 07:08:09 +00:00
Andrew Tridgell
cdf223083f two minor bugfixes for SCO UnixWare. The first is to catch SIGPIPE so that putmsg() inside their send() doesn't kill swat and the scond is to open /dev/null to replace stdin after we close that
(This used to be commit d35bbe56bc)
2000-04-11 07:14:12 +00:00
Jeremy Allison
0f1eee5c7a client/client.c:
libsmb/clientgen.c: Fixes for Win2k smbclient browsing.
Other fixes implement smbpasswd -x user to delete users. Also allows swat
to do the same.
Jeremy.
(This used to be commit 9f6ad04676)
2000-02-25 22:25:25 +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
Luke Leighton
a3c6e96a22 mods to allow inter-domain trust accounts to be added to SAM database
using smbpasswd command.
(This used to be commit 62d499f832)
1999-03-09 01:21:57 +00:00
Luke Leighton
04e382fb16 rpc_samr.h parse_samr.c srv_samr.c :
samr_query_aliasmembers (cool!)

util_pwdb.c sids.c nmbd.c server.c smbpasswd.c swat.c :

	pwdb_initialise(BOOL is_server) now creates / reads DOMAIN_NAME.SID
	if is_server is True, and does LsaQueryInfoPolicy(levels 3 and 5)
	to obtain member and pdc sids.
(This used to be commit 3e1eb4f26b)
1998-12-01 19:10:44 +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
b90966d85b make the help links appear in a separate window, so you can read the
docs and do configuration at the same time.
(This used to be commit 386a3bfd33)
1998-11-27 06:36:56 +00:00
Andrew Tridgell
89058f8bc1 better layout of password options.
(This used to be commit d3fa0dd7a8)
1998-11-27 06:09:25 +00:00
Andrew Tridgell
42e96160d3 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.
(This used to be commit fe4ef4bbef)
1998-11-21 01:41:14 +00:00
Jeremy Allison
a97baa50fd smbd/password.c: Added *SMBSERVER fix is name is too long.
web/swat.c: Changed '?' to help.
Jeremy.
(This used to be commit 631913ea85)
1998-11-21 00:16:28 +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
Luke Leighton
74d539f557 - 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.
(This used to be commit 0d21e1e609)
1998-11-17 16:19:04 +00:00
Andrew Tridgell
57d4977f24 - 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)
(This used to be commit 8e8ab4df1f)
1998-11-14 02:29:38 +00:00
Andrew Tridgell
f616831953 allow all user to view the config
(This used to be commit ab35d99e52)
1998-11-14 02:14:30 +00:00
Andrew Tridgell
5be7ae453d remove code that allows installation via cgi
swat will now give an error message if run via cgi
(This used to be commit 55377e3cdd)
1998-11-14 02:10:55 +00:00
Jeremy Allison
8fc1504ff8 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.
(This used to be commit 4c2b5a0098)
1998-11-13 21:41:01 +00:00
Andrew Tridgell
e5d9a4f4e3 %\ is an interesting printf argument, but I prefer %s
(This used to be commit b93f686655)
1998-11-12 23:59:59 +00:00
Herb Lewis
ea2fa33f65 Removed code that used printf/fprintf in password changin libraries.
Now passes strings instead.
(This used to be commit 48af29bcc9)
1998-11-12 23:49:32 +00:00
Herb Lewis
d30b6ab548 .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.
(This used to be commit 3c45a3503e)
1998-11-12 22:17:51 +00:00
Herb Lewis
7e71258563 changes from John Sygulla for changing remote passwords
(This used to be commit e3fc90d0b5)
1998-11-12 18:44:16 +00:00
Andrew Tridgell
6bf01d58ca handle null usernames
(This used to be commit ee60d9a289)
1998-11-12 07:32:33 +00:00
Andrew Tridgell
27d96564ce show all buttons in demo mode
(This used to be commit d076daaaf8)
1998-11-12 07:28:29 +00:00
Andrew Tridgell
c287a82057 fixed demo mode
(This used to be commit 530a98022e)
1998-11-12 07:13:06 +00:00
Andrew Tridgell
29e36b7134 extracted the password change code from smbpasswd and used it in swat
instead of opening pipes and other horrible stuff.
(This used to be commit 49bf197103)
1998-11-12 07:06:48 +00:00
Jeremy Allison
b0a2e2e778 Added the security changes suggested by Andrew - become the
user that authenticated to swat permanently (if not root).
Jeremy.
(This used to be commit 7d55bf3791)
1998-11-12 03:06:00 +00:00
Jeremy Allison
85dde8c7cb Added enable user button. Fixed bug where log was always printed.
Jeremy.
(This used to be commit 43ddc85779)
1998-11-12 01:22:07 +00:00
Andrew Tridgell
01ceb5e2d7 changed is_root() to am_root() to prevent clash with variable names.
(This used to be commit 52f47b8d2e)
1998-11-11 23:47:03 +00:00
Jeremy Allison
f49b994aeb 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.
(This used to be commit 80e0f7e107)
1998-11-11 23:25:51 +00:00
Herb Lewis
6559aa10d5 added password change functionality to swat
(This used to be commit 06d4026cf1)
1998-11-11 21:37:44 +00:00
Herb Lewis
fadde42107 swat.c updated to use new yodl generated smb.conf.5.html file for help
added smb.conf.5.html to swat/help
(This used to be commit 9f250a80c6)
1998-11-11 01:54:31 +00:00
Alexandre Oliva
ac39ce3eba replace getpass() with getsmbpass() if getsmbpass.c compiles
(This used to be commit 9a5bdf5c1b)
1998-09-21 11:34:44 +00:00
Andrew Tridgell
b68d65d4bc use /swat/ prefix in both inetd and cgi modes, to enable a static header.html
(This used to be commit ddb788c24d)
1998-09-02 02:02:30 +00:00
Andrew Tridgell
7b07680d3b spruced up SWAT a bit - it now uses the new Samba logo at the top and
a table to give it a little border
(This used to be commit d35c6e8098)
1998-09-01 06:03:03 +00:00
Andrew Tridgell
127655cc88 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.
(This used to be commit b088c804f9)
1998-08-15 07:27:34 +00:00