diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2019-04-29 01:50:39 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2019-04-29 18:11:15 -0400 |
commit | 73bfee6308c97af833f95dc2204c18d9e1cd3391 (patch) | |
tree | 3b48732e0f05da54ed1c5ef51b9bd007dd37fd16 /src/mod_expire.c | |
parent | 5ac92dca08359f1991042ac624ec2d1056b9ff40 (diff) | |
download | lighttpd-git-73bfee6308c97af833f95dc2204c18d9e1cd3391.tar.gz |
[stat_cache] separate func for symlink policy chk
Note: historical ToC-ToU race condition still exists in implementation
server.follow-symlink = "disable" is not recommended (default: "enable")
Diffstat (limited to 'src/mod_expire.c')
-rw-r--r-- | src/mod_expire.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_expire.c b/src/mod_expire.c index ae7714be..46ac43d2 100644 --- a/src/mod_expire.c +++ b/src/mod_expire.c @@ -361,9 +361,6 @@ CONNECTION_FUNC(mod_expire_handler) { time_t ts, expires; stat_cache_entry *sce = NULL; - /* if stat fails => sce == NULL, ignore return value */ - (void) stat_cache_get_entry(srv, con, con->physical.path, &sce); - switch(mod_expire_get_offset(srv, p, vb, &ts)) { case 0: /* access */ @@ -372,6 +369,9 @@ CONNECTION_FUNC(mod_expire_handler) { case 1: /* modification */ + /* if stat fails => sce == NULL, ignore return value */ + (void) stat_cache_get_entry(srv, con, con->physical.path, &sce); + /* can't set modification based expire header if * mtime is not available */ |