Fossil SCM

When resetting capabilities, make sure that "anonymous" and "nobody" can be reapplied afterwards.

drh 2013-08-06 14:33 trunk
Commit b1ffbfa4bc626d90bf78d8893dee0f45c5b87226
1 file changed +1
--- src/login.c
+++ src/login.c
@@ -1046,10 +1046,11 @@
10461046
** Zeroes out g.perm and calls login_set_capabilities(zCap,flags).
10471047
*/
10481048
void login_replace_capabilities(const char *zCap, unsigned flags){
10491049
memset(&g.perm, 0, sizeof(g.perm));
10501050
login_set_capabilities(zCap, flags);
1051
+ login_anon_once = 1;
10511052
}
10521053
10531054
/*
10541055
** If the current login lacks any of the capabilities listed in
10551056
** the input, then return 0. If all capabilities are present, then
10561057
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button