[v3] Annotate Deprecated Functions in libselinux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



V3:
- Made the deprecated annotation dependent on __GNUC__ like
  the __format__(printf,...) specifiers. This will allow these
  not be defined when swig is building, so this will fix the
  swig syntax issues.
- Swig's build flags include -Wno-deprecated-declarations becuase the
  bindings need to pull the fill API out, even deprecated functions.
- Rather than compile matchpathcon with static selinux, I just set its
  compile flags to include -Wno-deprecated-declarations. Essentially
  saying, yes use this old interface it's Ok in this instance.

V2:
- Simplified now that dso.h stuff has been removed.
- selinux_check_passwd_access has been deprecated and now
  both selinux_check_passwd_access and checkPasswdAccess
  are recomending selinux_check_access.
- matchpathcon is linked statically to get access to deprecated
  routines and prints a deprecated warning to stderr.

V1:
I went through and annotated deprecated routines we have in
libselinux that are mentioned to be deprecated either in code
comments and/or manpages.

External users, when compiling will see a warning similair to some
sample output:

a.c: In function ‘main’:
a.c:18:2: warning: ‘foo’ is deprecated: foo bar msg [-Wdeprecated-declarations]
  foo();
  ^~~
a.c:5:5: note: declared here
 int foo(void) {
      ^~~
a.c:19:2: warning: ‘boo’ is deprecated [-Wdeprecated-declarations]
  boo();
  ^~~
a.c:11:5: note: declared here
 int boo(void) {

[PATCH v3 01/19] security_load_booleans: update return comment
[PATCH v3 02/19] security_load_booleans: annotate deprecated
[PATCH v3 03/19] selinux_booleans_path: annotate deprecated
[PATCH v3 04/19] selinux_users_path: annotate deprecated
[PATCH v3 05/19] rpm_execcon: annotate deprecated
[PATCH v3 06/19] sidget: annotate deprecated
[PATCH v3 07/19] sidput: annotate deprecated
[PATCH v3 08/19] checkPasswdAccess: annotate deprecated
[PATCH v3 09/19] matchpathcon_init: annotate deprecated
[PATCH v3 10/19] matchpathcon_fini: annotate deprecated
[PATCH v3 11/19] matchpathcon: annotate deprecated
[PATCH v3 12/19] avc_init: annotate deprecated
[PATCH v3 13/19] avc: create internal avc_init interface
[PATCH v3 14/19] matchpathcon: create internal matchpathcon_fini
[PATCH v3 15/19] matchpathcon: create internal matchpathcon interface
[PATCH v3 16/19] selinux_check_passwd_access: annotate deprecated
[PATCH v3 17/19] matchpathcon: allow use of deprecated routines
[PATCH v3 18/19] utils: matchpathcon add deprecated warning
[PATCH v3 19/19] Makefile: swig build allow deprecated functions




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux