Fossil SCM
When resetting capabilities, make sure that "anonymous" and "nobody" can be reapplied afterwards.
Commit
b1ffbfa4bc626d90bf78d8893dee0f45c5b87226
Parent
2360b17d7325b39…
1 file changed
+1
+1
| --- src/login.c | ||
| +++ src/login.c | ||
| @@ -1046,10 +1046,11 @@ | ||
| 1046 | 1046 | ** Zeroes out g.perm and calls login_set_capabilities(zCap,flags). |
| 1047 | 1047 | */ |
| 1048 | 1048 | void login_replace_capabilities(const char *zCap, unsigned flags){ |
| 1049 | 1049 | memset(&g.perm, 0, sizeof(g.perm)); |
| 1050 | 1050 | login_set_capabilities(zCap, flags); |
| 1051 | + login_anon_once = 1; | |
| 1051 | 1052 | } |
| 1052 | 1053 | |
| 1053 | 1054 | /* |
| 1054 | 1055 | ** If the current login lacks any of the capabilities listed in |
| 1055 | 1056 | ** the input, then return 0. If all capabilities are present, then |
| 1056 | 1057 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1046,10 +1046,11 @@ | |
| 1046 | ** Zeroes out g.perm and calls login_set_capabilities(zCap,flags). |
| 1047 | */ |
| 1048 | void login_replace_capabilities(const char *zCap, unsigned flags){ |
| 1049 | memset(&g.perm, 0, sizeof(g.perm)); |
| 1050 | login_set_capabilities(zCap, flags); |
| 1051 | } |
| 1052 | |
| 1053 | /* |
| 1054 | ** If the current login lacks any of the capabilities listed in |
| 1055 | ** the input, then return 0. If all capabilities are present, then |
| 1056 |
| --- src/login.c | |
| +++ src/login.c | |
| @@ -1046,10 +1046,11 @@ | |
| 1046 | ** Zeroes out g.perm and calls login_set_capabilities(zCap,flags). |
| 1047 | */ |
| 1048 | void login_replace_capabilities(const char *zCap, unsigned flags){ |
| 1049 | memset(&g.perm, 0, sizeof(g.perm)); |
| 1050 | login_set_capabilities(zCap, flags); |
| 1051 | login_anon_once = 1; |
| 1052 | } |
| 1053 | |
| 1054 | /* |
| 1055 | ** If the current login lacks any of the capabilities listed in |
| 1056 | ** the input, then return 0. If all capabilities are present, then |
| 1057 |