[PATCH] Fix error codes in swat
Vance Lankhaar
vlankhaar at shaw.ca
Fri Feb 28 03:24:43 GMT 2003
Here's a quick patch to fix a few error codes in swat - return 500 on a
server error, not 400, and return 403 Forbidden instead of 400 Server
Error when attempting to access swat from a host not allowed by "hosts
allow" or "hosts deny"
Also a quick typo in a comment
Vance Lankhaar
Index: web/cgi.c
===================================================================
RCS file: /cvsroot/samba/source/web/cgi.c,v
retrieving revision 1.68
diff -u -r1.68 cgi.c
--- web/cgi.c 19 Feb 2003 00:27:38 -0000 1.68
+++ web/cgi.c 28 Feb 2003 03:18:11 -0000
@@ -455,11 +455,11 @@
char *lang;
if (chdir(rootdir)) {
- cgi_setup_error("400 Server Error", "",
+ cgi_setup_error("500 Server Error", "",
"chdir failed - the server is not configured correctly");
}
- /* Handle the possability we might be running as non-root */
+ /* Handle the possibility we might be running as non-root */
sec_init();
if ((lang=getenv("HTTP_ACCEPT_LANGUAGE"))) {
@@ -478,7 +478,7 @@
inetd_server = True;
if (!check_access(1, lp_hostsallow(-1), lp_hostsdeny(-1))) {
- cgi_setup_error("400 Server Error", "",
+ cgi_setup_error("403 Forbidden", "",
"Samba is configured to deny access from this client\n<br>Check
your \"hosts allow\" and \"hosts deny\" options in smb.conf ");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: web_cgi_c.diff
Type: text/x-patch
Size: 998 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20030227/9d4d716d/web_cgi_c.bin
More information about the samba-technical
mailing list