diff options
author | Jeremy Allison <jra@samba.org> | 2003-05-07 18:28:26 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-05-07 18:28:26 +0000 |
commit | a262aa732981c99dface289922ee5952b4caba6f (patch) | |
tree | 5fbd2a7a4c2be89b5e437ec4ee0b0843518e3174 /source3/web/swat.c | |
parent | 0627958bd3c6e6e14a48a3674f6577309e244c6e (diff) | |
download | samba-a262aa732981c99dface289922ee5952b4caba6f.tar.gz samba-a262aa732981c99dface289922ee5952b4caba6f.tar.bz2 samba-a262aa732981c99dface289922ee5952b4caba6f.zip |
Make fchown, fchmod conditional for systems that don't have them.
Jeremy.
(This used to be commit 4fe84f61735ee2328e01d2ae864b0e6c7729f51b)
Diffstat (limited to 'source3/web/swat.c')
-rw-r--r-- | source3/web/swat.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/web/swat.c b/source3/web/swat.c index fa319bb3ae..7f9492933a 100644 --- a/source3/web/swat.c +++ b/source3/web/swat.c @@ -417,7 +417,11 @@ static int save_reload(int snum) /* just in case they have used the buggy xinetd to create the file */ if (fstat(fileno(f), &st) == 0 && (st.st_mode & S_IWOTH)) { +#if defined HAVE_FCHMOD fchmod(fileno(f), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); +#else + chmod(dyn_CONFIGFILE, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); +#endif } write_config(f, False); |