Hi,
On 08/04/2022 13:18, Timo Rothenpieler wrote:
This one does not really look like it should be in "fallback:" - because
that way it always gets called, even if we jump there right at function
entry, if keep_caps == 0.
No, it's intentional. It ensures that it's printed even if we don't
HAVE_LIBCAPNG but someone called the function requesting to keep
capabilities, which is not possible then.
Along Gert's thoughts: maybe there should be 2 labels, one that is just
"out" and one that is "fallback".
Simply because jumping to "fallback" when it was not requested to retain
capabilities (keep_caps == 0) may not sound right (are we really falling
back in this case?)
Cheers,
+
+ if (keep_caps)
+ {
+ msg(err_flags, "Unable to retain capabilities");
+ }
+
+ platform_group_set(group_state);
+ platform_user_set(user_state);
+}
+
Maybe "fallback:" should be right before platform_group_set()?
(Sorry for being late to the "complain about your code" party...)
gert
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
--
Antonio Quartulli
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel