diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-03-14 04:13:24 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-03-14 04:13:24 +0000 |
commit | d5c1af5d9fb33e42e24dc3f1c0ea235eb1fb904a (patch) | |
tree | 8e224afbdd5c78c2be82f5b1fae82122db49a251 /source3/web/swat.c | |
parent | 914a0b14aad364dd91ca4da90a82995919596e42 (diff) | |
download | samba-d5c1af5d9fb33e42e24dc3f1c0ea235eb1fb904a.tar.gz samba-d5c1af5d9fb33e42e24dc3f1c0ea235eb1fb904a.tar.bz2 samba-d5c1af5d9fb33e42e24dc3f1c0ea235eb1fb904a.zip |
fixed support for running swat via cgi-bin
(This used to be commit 9dbfb16990954ee3518ce3bc73e067c82b653930)
Diffstat (limited to 'source3/web/swat.c')
-rw-r--r-- | source3/web/swat.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index 09d0f08ea6..987520d2cf 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -219,7 +219,11 @@ static void load_config(void) /* spit out the html for a link with an image */ static void image_link(char *name,char *hlink, char *src, int width, int height) { - printf("<A HREF=\"%s\"><img width=%d height=%d src=\"%s\" alt=\"%s\"></A>\n", hlink, width, height, src, name); + printf("<A HREF=\"%s/%s\"><img width=%d height=%d src=\"%s%s\" alt=\"%s\"></A>\n", + cgi_baseurl(), + hlink, width, height, + cgi_rooturl(), + src, name); } /* display the main navigation controls at the top of each page along @@ -562,7 +566,7 @@ int main(int argc, char *argv[]) cgi_setup(SWATDIR, auth_required); print_header(); - + charset_initialise(); /* if this binary is setuid then run completely as root */ @@ -574,7 +578,7 @@ int main(int argc, char *argv[]) show_main_buttons(); - page = cgi_baseurl(); + page = cgi_pathinfo(); if (strcmp(page, "globals")==0) { globals_page(); |