diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-09-10 11:08:57 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-09-10 11:08:57 +0000 |
commit | b30e75692d68233448b3ad3d7ddd4b4ac423d3ab (patch) | |
tree | ed752b80838a33953632c7f3ffcaf0a71c47a7f5 /source3/web | |
parent | ba8e3e03432ee7649a3f59ba8b37edbb32c34190 (diff) | |
download | samba-b30e75692d68233448b3ad3d7ddd4b4ac423d3ab.tar.gz samba-b30e75692d68233448b3ad3d7ddd4b4ac423d3ab.tar.bz2 samba-b30e75692d68233448b3ad3d7ddd4b4ac423d3ab.zip |
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 1af8bf34f1caa3e7ec312d8109c07d32a945a448)
Diffstat (limited to 'source3/web')
-rw-r--r-- | source3/web/cgi.c | 6 | ||||
-rw-r--r-- | source3/web/swat.c | 6 |
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); |