[cpp-sp] 02/02: Fix check of file handle.

Codeberg noreply at shibboleth.net
Fri Sep 18 14:27:33 UTC 2026


This is an automated email from the git hooks/post-receive script.

codeberg pushed a commit to branch main
in repository cpp-sp.

View the commit online:
https://codeberg.org/Shibboleth/cpp-sp/commit/47f2f963e00b47e52f670d9ef8543ca33cc1959b

commit 47f2f963e00b47e52f670d9ef8543ca33cc1959b
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Fri Sep 18 10:27:14 2026 -0400

    Fix check of file handle.
---
 shibsp/session/impl/FilesystemSessionCache.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shibsp/session/impl/FilesystemSessionCache.cpp b/shibsp/session/impl/FilesystemSessionCache.cpp
index e3f6e79a..dd36081d 100644
--- a/shibsp/session/impl/FilesystemSessionCache.cpp
+++ b/shibsp/session/impl/FilesystemSessionCache.cpp
@@ -210,7 +210,7 @@ string FilesystemSessionCache::cache_create(SPRequest* request, const char* cand
 #else
         int f = open(path.c_str(), O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
 #endif
-        if (f > 0) {
+        if (f >= 0) {
             // Worked, so close the "reserved" file so we can overwrite it.
 #ifdef WIN32
             _close(f);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list