~cmiller/ubuntu/trusty/apparmor/remove-chromium-browser

« back to all changes in this revision

Viewing changes to libraries/libapparmor/doc/aa_getcon.pod

  • Committer: Package Import Robot
  • Author(s): Jamie Strandboge, Tyler Hicks, Jamie Strandboge
  • Date: 2013-09-10 12:06:06 UTC
  • Revision ID: package-import@ubuntu.com-20130910120606-cli33sg3o4tgayou
Tags: 2.8.0-0ubuntu28
[ Tyler Hicks ]
* Move the aa-exec man page out of apparmor-utils into apparmor, since
  aa-exec is now in apparmor
  - debian/control: adjust Breaks/Replaces to use apparmor-utils
    (<< 2.8.0-0ubuntu28)
  - debian/apparmor.manpages: install the aa-exec man page
  - debian/apparmor-utils.manpages: don't install the aa-exec man page
* debian/patches/0065-lp1220861.patch: Always NUL-terminate confinement
  context strings returned from libapparmor (LP: #1220861)
* debian/patches/0066-lp1196880.patch: Don't assign mode pointer in
  aa_getprocattr() if caller passed in NULL (LP: #1196880)
* debian/patches/0067-libapparmor-mode-strings-are-not-to-be-freed.patch:
  Update man page and code comments to make it clear that freeing the *con
  string returned from libapparmor's getcon functions also frees the *mode
  string
* debian/patches/0068-libapparmor-mention-dbus-method-in-getcon-man.patch:
  Document the D-Bus method, in the aa_getcon man page, that returns the
  AppArmor task confinement string of a D-Bus connection

[ Jamie Strandboge ]
* debian/patches/0069-p11kit-abstraction.patch: p11-kit needs access to
  /usr/share/p11-kit/modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
aa_getpeercon - get the confinement of a socket's other end (peer)
30
30
 
 
31
org.freedesktop.DBus.GetConnectionAppArmorSecurityContext - get the task confinement of a D-Bus connection's owner
 
32
 
31
33
=head1 SYNOPSIS
32
34
 
33
35
B<#include E<lt>sys/apparmor.hE<gt>>
34
36
 
35
 
B<int aa_getprocattr_raw(pid_t tid, const char *attr, char *buf, int len,
36
 
                         char **mode);>
 
37
B<int aa_getprocattr_raw(pid_t tid, const char *attr, char *buf, int len, char **mode);>
37
38
 
38
 
B<int aa_getprocattr(pid_t tid, const char *attr, char **buf, char **mode);>
 
39
B<int aa_getprocattr(pid_t tid, const char *attr, char **con, char **mode);>
39
40
 
40
41
B<int aa_gettaskcon(pid_t target, char **con, char **mode);>
41
42
 
47
48
 
48
49
Link with B<-lapparmor> when compiling.
49
50
 
 
51
Additionally, a D-Bus method is available:
 
52
 
 
53
B<STRING org.freedesktop.DBus.GetConnectionAppArmorSecurityContext(in STRING name)>
 
54
 
50
55
=head1 DESCRIPTION
51
56
 
52
57
The aa_getcon function gets the current AppArmor confinement context for the
53
58
current task.  The confinement context is usually just the name of the AppArmor
54
59
profile restricting the task, but it may include the profile namespace or in
55
 
some cases a set of profile names (known as a stack of profiles).  The returned string *con should be freed using free().
 
60
some cases a set of profile names (known as a stack of profiles).  The returned
 
61
string *con should be freed using free(), but the returned string *mode should
 
62
not be freed. The *con and *mode strings come from a single buffer allocation
 
63
and are separated by a NUL character.
56
64
 
57
65
The aa_gettaskcon function is like the aa_getcon function except it will work
58
66
for any arbitrary task in the system.
72
80
The aa_getprocattr_raw() is the backend for the aa_getprocattr function and
73
81
does not handle buffer allocation.
74
82
 
 
83
The org.freedesktop.DBus.GetConnectionAppArmorSecurityContext() D-Bus method
 
84
gets the AppArmor confinement string associated with the unique connection
 
85
name. If D-Bus is not performing AppArmor mediation, the
 
86
org.freedesktop.DBus.Error.AppArmorSecurityContextUnknown error is returned.
 
87
 
75
88
=head1 RETURN VALUE
76
89
 
77
90
On success size of data placed in the buffer is returned, this includes the