summaryrefslogtreecommitdiff
path: root/source3/web
diff options
context:
space:
mode:
Diffstat (limited to 'source3/web')
-rw-r--r--source3/web/cgi.c6
-rw-r--r--source3/web/swat.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/web/cgi.c b/source3/web/cgi.c
index 651cd3d8c3..88f4d3f36f 100644
--- a/source3/web/cgi.c
+++ b/source3/web/cgi.c
@@ -149,9 +149,9 @@ void cgi_load_variables(FILE *f1)
len = content_length;
}
} else {
- fseek(f, 0, SEEK_END);
- len = ftell(f);
- fseek(f, 0, SEEK_SET);
+ struct stat st;
+ fstat(fileno(f), &st);
+ len = st.st_size;
}
diff --git a/source3/web/swat.c b/source3/web/swat.c
index f963c16ccf..8551c5e907 100644
--- a/source3/web/swat.c
+++ b/source3/web/swat.c
@@ -999,7 +999,7 @@ static void printers_page(void)
{
extern char *optarg;
extern int optind;
- extern FILE *dbf;
+ extern XFILE *dbf;
int opt;
char *page;
@@ -1016,8 +1016,8 @@ static void printers_page(void)
/* we don't want any SIGPIPE messages */
BlockSignals(True,SIGPIPE);
- dbf = sys_fopen("/dev/null", "w");
- if (!dbf) dbf = stderr;
+ dbf = x_fopen("/dev/null", O_WRONLY, 0);
+ if (!dbf) dbf = x_stderr;
/* we don't want stderr screwing us up */
close(2);