summaryrefslogtreecommitdiffstats
path: root/source/web/cgi.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix HTTP error codes (patch by Vance Lankhaar)Jelmer Vernooij2003-02-281-3/+3
|
* base64_decode() with heimdal libs, so I've renamed it base64_decode_inplace().Jim McDonough2003-02-191-1/+1
|
* Prompted by RedHat bugzilla bug #77999, convert the user's username andAndrew Bartlett2003-02-011-4/+11
| | | | | | password from 'display' to 'unix' before we check them. Andrew Bartlett
* Updates to the NTLMSSP code again - moving the base64 decode fuctionality outAndrew Bartlett2003-01-161-31/+0
| | | | | | | | | | | | | of the SWAT code, and adding a base64 encoder. The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for use with Squid. Unfortunetly the squid side doesn't quite support what we need yet. Changes to winbind to get us the info we need, and a couple of consequential changes/cleanups in the rest of the code. Andrew Bartlett
* BIG patch...Andrew Bartlett2003-01-021-9/+9
| | | | | | | | | | | | | | | | This patch makes Samba compile cleanly with -Wwrite-strings. - That is, all string literals are marked as 'const'. These strings are always read only, this just marks them as such for passing to other functions. What is most supprising is that I didn't need to change more than a few lines of code (all in 'net', which got a small cleanup of net.h and extern variables). The rest is just adding a lot of 'const'. As far as I can tell, I have not added any new warnings - apart from making all of tdbutil.c's function const (so they warn for adding that const string to struct). Andrew Bartlett
* Remove FILE_MACRO as __FILE__ is ANSI C.Tim Potter2002-12-041-1/+1
|
* use FILE_MACRO instead of __FILE__Herb Lewis2002-12-031-1/+1
| | | | use FUNCTION_MACRO instead of __FUNCTION_
* Add ntlm_auth, a new program to provide a stable interface to winbind'sAndrew Bartlett2002-11-241-41/+4
| | | | | | | | | | | | | | | | authentication code. In particular, ntlm_auth is designed to replace the winbind authentication 'helpers' currently supplied by Squid. I have added support for the current plaintext password protocol used by Squid, and will add the real guts (NTLMSSP support) shortly. I'll merge this into 3.0 when I've got the interface more stable (error message format etc) and got the important NTLMSSP support added. Also move SWAT's URL decoding code into util_str.c, for use in both utilities. Andrew Bartlett
* Use memmove when copies can overlap. Spotted by SUGIOKA Toshinobu ↵Jeremy Allison2002-10-091-1/+1
| | | | | | <sugioka@itonet.co.jp>. Jeremy.
* Another patch from Steve Langasek <vorlon@netexpress.net>, again from theAndrew Bartlett2002-10-031-1/+1
| | | | | | | | | | | | Debian patchset. The idea is to still allow DNS domains to be specified in 'hosts allow' and 'hosts deny' without making the admin set 'hostname lookups' in their smb.conf. His concern is about upgrades. This has been designed not to change the value of %M. Andrew Bartlett
* Break up samba's object dependencies, and its prototype includes.Andrew Bartlett2002-06-251-1/+1
| | | | | | | | | | | | | | | | Now smbclient, net, and swat use their own proto files - now the global proto.h The change to libads/kerberos.c was to break up the dependency on secrets.c - we want to be able to write an ADS client that doesn't need local secrets. I have other breakups in the works - I will remove the dependency of rpc_parse on passdb (and therefore secrets.c) shortly. (NOTE: This patch does *not* break up includes.h, or other such forbidden actions). Andrew Bartlett
* getpwnam -> getpwnam_allocAndrew Bartlett2002-01-211-1/+2
|
* A nice *big* change to the fundemental way we do things.Andrew Bartlett2002-01-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Samba (ab)uses the returns from getpwnam() a lot - in particular it keeps them around for a long time - often past the next call... This adds a getpwnam_alloc and a getpwuid_alloc to the collection. These function as expected, returning a malloced structure that can be free()ed with passwd_free(&passwd). This patch also cuts down on the number of calls to getpwnam - mostly by taking advantage of the fact that the passdb interface is already case-insensiteve. With this patch most of the recursive cases have been removed (that I know of) and the problems are reduced further by not using the sys_ interface in the new code. This means that pointers to the cache won't be affected. (This is a tempoary HACK, I intend to kill the password cache entirly). The only change I'm a little worried about is the change to rpc_server/srv_samr_nt.c for private groups. In this case we are getting groups from the new group mapping DB. Do we still need to check for private groups? I've toned down the check to a case sensitve match with the new code, but we might be able to kill it entirly. I've also added a make_modifyable_passwd() function, that copies a passwd struct into the form that the old sys_getpw* code provided. As far as I can tell this is only actually used in the pass_check.c crazies, where I moved the final 'special case' for shadow passwords (out of _Get_Pwnam()). The matching case for getpwent() is dealt with already, in lib/util_getent.c Also included in here is a small change to register the [homes] share at vuid creation rather than just in one varient of the session setup. (This picks up the SPNEGO cases). The home directory is now stored on the vuid, and I am hoping this might provide a saner way to do %H substitions. TODO: Kill off remaining Get_Pwnam_Modify calls (they are not needed), change the remaining sys_getpwnam() callers to use getpwnam_alloc() and move Get_Pwnam to return an allocated struct. Andrew Bartlett
* Fix const warning. Doxyfy comment.Martin Pool2001-11-191-5/+8
|
* the next step in the intl changeover. This should get us compiling agian,Andrew Tridgell2001-10-141-22/+17
| | | | | | | and also completes the switch to lang_tdb.c. SWAT should now work with a po file in the lib/ directory also removed useless SYSLOG defines in many files
* Fixup passdb stuff to add new nisplus and ldap backends.Jeremy Allison2001-09-251-0/+2
| | | | Jeremy.
* Added SWAT i18n feature:Motonobu Takahashi2001-09-241-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | TO enable configure with --with-i18n-swat to support this gettext is integrated and a new directories name "po" and "intl" are created. now these languages are supported: en - English (default) ja - Japanese po - Polish tr - Turkish To add your language, to create ${your_language}.po by translating source/po/en.po into your language is needed. some of html and image files of various language version are not included yet, though message catalogue files are installed. you need to copy files manually under ${swatdir}/lang/$ln/{help,images,included,using_samba} And also added a option to intall manual pages: of various lang version To enable configure with --with-manlangs but manual pages themself are not included yet.
* fixed a silly off by 1 bugAndrew Tridgell2001-09-241-2/+2
|
* fixed bug in POST var handlingAndrew Tridgell2001-09-241-4/+2
|
* convert all POST variables from display to unix charsetAndrew Tridgell2001-09-241-22/+28
|
* Move pass_check.c over to NTSTATUS, allowing full NTSTATUS from PAM to wire!Andrew Bartlett2001-09-201-8/+5
| | | | | Add the ability for swat to run in non-root-mode (ie non-root from inetd). - we still need some of the am_root() calls fixed however.
* Remove the ugly hacks to get around the Get_Pwnam() calls in pass_check.c byAndrew Bartlett2001-09-191-47/+24
| | | | | | | | | | | | | simply not doing Get_Pwnam() calls in pass_check.c We now make *one* sys_getpnam() call in cgi.c and we always call PAM no matter what it returns. We also no longer run the password cracker for these logins. The truly parinod will note the slight difference in call paths, in that we only call crypt for valid password structs (if not --with-pam). The truly parinoid don't run SWAT either, so I don't think this is an issue. Andrew Bartlett
* move to SAFE_FREE()Simo Sorce2001-09-171-1/+1
|
* replaced stdio in many parts of samba with a XFILE. XFILE is a cut-downAndrew Tridgell2001-09-101-3/+3
| | | | | | | | | 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.
* it was half committed last time,Simo Sorce2001-08-121-2/+2
| | | | thanks to Hasch@t-online.de (Juergen Hasch) for spotting that.
* Change all realloc() statements to Realloc() (ecxept for tdb.c)Simo Sorce2001-08-081-13/+13
| | | | | | | changed some code to exploit the fact that Realloc(NULL, size) == malloc(size) fixed some possible mem leaks, or seg faults. thanks to andreas moroder (mallocs not checked in client/client.c, client/smbumount.c)
* This removes unused paramaters from various authtication functions, and shouldAndrew Bartlett2001-07-081-2/+2
| | | | | | | | | not change behaviour. This should make my later diffs smaller, where I actualy start cleaning up this mess... Andrew Bartlett
* strchr and strrchr are macros when compiling with optimisation in gcc, so we ↵Andrew Tridgell2001-07-041-12/+12
| | | | can't redefine them. damn.
* - added ability for swat to run under CGI. This needsAndrew Tridgell2001-05-171-1/+33
| | | | | to be setup very carefully for it not to be a security hole - reran configure
* Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMRJeremy Allison2001-03-111-2/+1
| | | | | | RPC code to merge with new passdb code. Currently rpcclient doesn't compile. I'm working on it... Jeremy.
* Fix to the "known/unknown user" difference patch from "Ron Alexander" ↵Jeremy Allison2000-11-061-0/+1
| | | | | | <rcalex@home.com>. Jeremy.
* Remove CGI logging code. Make username/password lookups takeJeremy Allison2000-11-011-29/+28
| | | | | the same time. Jeremy.
* Fix for swat to return correct MIME type for text files. From "RonTim Potter2000-09-011-0/+2
| | | | Alexander" <rcalex@home.com>
* finally got sick of the "extern int Client" code and the stupidAndrew Tridgell2000-04-111-3/+3
| | | | | | | | | | | | | | | | assumption that we have one socket everywhere while doing so I discovered a few bugs! 1) the clientgen session retarget code if used from smbd or nmbd would cause a crash as it called close_sockets() which closed our main socket! fixed by removing close_sockets() completely - it is unnecessary 2) the caching in client_addr() and client_name() was bogus - it could easily get fooled and give the wrong result. fixed. 3) the retarget could could recurse, allowing an easy denial of service attack on nmbd. fixed.
* two minor bugfixes for SCO UnixWare. The first is to catch SIGPIPE so that ↵Andrew Tridgell2000-04-111-0/+1
| | | | putmsg() inside their send() doesn't kill swat and the scond is to open /dev/null to replace stdin after we close that
* first pass at updating head branch to be to be the same as the SAMBA_2_0 branchAndrew Tridgell1999-12-131-17/+4
|
* Moved code that changes the pw_passwd entry (i.e shadow password andTim Potter1999-06-131-1/+1
| | | | | | | | weird unixware stuff) into _Get_Pwnam() to fix a memory allocation bug. Note that the Get_Pwnam() function now returns a const struct passwd * as a hint to other developers not to change entries in the struct passwd.
* make SWAT obey the global "hosts allow" and "hosts deny" settings.Andrew Tridgell1998-11-211-1/+24
| | | | | any attempt to run swat from a host that is disallowed will give an error.
* Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls.Jeremy Allison1998-11-171-2/+2
| | | | | | | | | | 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.
* remove code that allows installation via cgiAndrew Tridgell1998-11-141-20/+35
| | | | swat will now give an error message if run via cgi
* Added the security changes suggested by Andrew - become theJeremy Allison1998-11-121-8/+62
| | | | | user that authenticated to swat permanently (if not root). Jeremy.
* changed is_root() to am_root() to prevent clash with variable names.Andrew Tridgell1998-11-111-2/+2
|
* J.F.'s latest printer fixes plus his gcc -picky fix for web/cgi.cJeremy Allison1998-11-111-1/+1
| | | | Jeremy.
* rpc_server/srv_netlog.c: Fixed crash bug with ACB_PWNOTREQ.Jeremy Allison1998-11-111-2/+2
| | | | | | 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.
* added password change functionality to swatHerb Lewis1998-11-111-6/+33
|
* report ourselves as HTTP/1.0 not HTTP/1.1Andrew Tridgell1998-10-261-3/+3
|
* Changes to test in configure if capabilities are enabled on a system.Jeremy Allison1998-09-281-2/+0
| | | | | | | | | | Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy.
* tridge the destroyer returns!Andrew Tridgell1998-09-051-168/+0
| | | | | | | | | | | | | | | | | | | | | | prompted by the interpret_security() dead code that Jean-Francois pointed out I added a make target "finddead" that finds potentially dead (ie. unused) code. It spat out 304 function names ... I went through these are deleted many of them, making others static (finddead also reports functions that are used only in the local file). in doing this I have almost certainly deleted some useful code. I may have even prevented compilation with some compile options. I apologise. I decided it was better to get rid of this code now and add back the one or two functions that are needed than to keep all this baggage. So, if I have done a bit too much "destroying" then let me know. Keep the swearing to a minimum :) One bit I didn't do is the ubibt code. Chris, can you look at that? Heaps of unused functions there. Can they be made static?
* use /swat/ prefix in both inetd and cgi modes, to enable a static header.htmlAndrew Tridgell1998-09-021-14/+4
|
* More abstraction of file system data types, to move to a 64Jeremy Allison1998-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | bit file interface for the NT SMB's. Created a new define, SMB_STRUCT_STAT that currently is defined to be struct stat - this wil change to a user defined type containing 64 bit info when the correct wrappers are written for 64 bit stat(), fstat() and lstat() calls. Also changed all sys_xxxx() calls that were previously just wrappers to the same call prefixed by a dos_to_unix() call into dos_xxxx() calls. This makes it explicit when a pathname translation is being done, and when it is not. Now, all sys_xxx() calls are meant to be wrappers to mask OS differences, and not silently converting filenames on the fly. Jeremy.