framework/security/smack.git
11 years agolibsmack: add support for modification rules.
Rafal Krypa [Thu, 7 Feb 2013 14:52:45 +0000 (15:52 +0100)]
libsmack: add support for modification rules.

A new API function smack_accesses_add_modify() is provided for adding
modification rule to a set. Rule specifies permissions to grant and
permissions to revoke. If a rule for given subject and object already
existed, unmentioned permissions will be left unchanged.
Also smack_access_save() and smack_access_add_from_file() are modified
to support reading and writing such rules from/to a file.

11 years agolibsmack: parse whole access type string, not only first 5 bytes.
Rafal Krypa [Thu, 3 Jan 2013 09:34:34 +0000 (10:34 +0100)]
libsmack: parse whole access type string, not only first 5 bytes.

Previous version of this function parsed only first ACC_LEN (5)
characters of access_type. Now the whole string will be read.

This will prevent silent ignoring of access type characters in cases
like "-rwxat" or "rrwxat".

11 years agoMerge pull request #10 from banada/master
Brian McGillion [Tue, 26 Mar 2013 09:41:07 +0000 (02:41 -0700)]
Merge pull request #10 from banada/master

disable services for systemd versions > 198

11 years agodisable services for new systemd versions
Nathaniel Chen [Fri, 8 Mar 2013 18:05:56 +0000 (10:05 -0800)]
disable services for new systemd versions

do not install smack.mount or smack.service if systemd is version
198 or higher. This functionality is now built into systemd.

11 years agoMerge pull request #9 from PassionZhao/master
PassionZhao [Wed, 20 Mar 2013 06:53:28 +0000 (23:53 -0700)]
Merge pull request #9 from PassionZhao/master

Fix the bug "smackcipso can't set CIPSO"

11 years agosmackcipso can't set CIPSO correctly, see the bug report:
Passion,Zhao [Thu, 7 Mar 2013 14:13:07 +0000 (22:13 +0800)]
smackcipso can't set CIPSO correctly, see the bug report:
        https://tizendev.org/bugs/browse/TDIS-3891

The reason is that upstream libsmack only use "smackfs/cipso2" long-label interface,
but the code's logical is still for orginal fixed length label.

Now update smack_cipso_apply() to support flexible label (<=256 including tailing '\0')

Signed-off-by: Passion,Zhao <passion.zhao@intel.com>
11 years agoMerge pull request #8 from rafal-krypa/samsung
Brian McGillion [Tue, 19 Feb 2013 09:18:44 +0000 (01:18 -0800)]
Merge pull request #8 from rafal-krypa/samsung

libsmack: check label length in smack_revoke_subject().

11 years agolibsmack: check label length in smack_revoke_subject().
Rafal Krypa [Thu, 3 Jan 2013 09:18:31 +0000 (10:18 +0100)]
libsmack: check label length in smack_revoke_subject().

11 years agoMerge pull request #7 from phmccarty/master
Brian McGillion [Tue, 8 Jan 2013 08:20:09 +0000 (00:20 -0800)]
Merge pull request #7 from phmccarty/master

Run AM_PROG_AR to fix build with newer automake

11 years agoRun AM_PROG_AR to fix build with newer automake
Patrick McCarty [Mon, 7 Jan 2013 20:24:54 +0000 (12:24 -0800)]
Run AM_PROG_AR to fix build with newer automake

11 years agolibsmack: add function for setting current process label.
Rafal Krypa [Wed, 12 Dec 2012 18:32:01 +0000 (19:32 +0100)]
libsmack: add function for setting current process label.

11 years agolibsmack: add API for revoking all rules for a subject label.
Rafal Krypa [Thu, 29 Nov 2012 11:16:27 +0000 (12:16 +0100)]
libsmack: add API for revoking all rules for a subject label.

11 years agoFix three compilation warnings.
Rafal Krypa [Wed, 9 May 2012 10:07:32 +0000 (12:07 +0200)]
Fix three compilation warnings.

11 years agoFix paths to upstream repositories.
Rafal Krypa [Tue, 3 Jul 2012 12:57:43 +0000 (14:57 +0200)]
Fix paths to upstream repositories.

11 years agoMove definition of max label length to a single place and export it in
Rafal Krypa [Thu, 29 Nov 2012 11:59:06 +0000 (12:59 +0100)]
Move definition of max label length to a single place and export it in
libsmack header file.

11 years agoInstall missing manual page links for library functions.
Rafal Krypa [Thu, 14 Jun 2012 17:13:54 +0000 (19:13 +0200)]
Install missing manual page links for library functions.

11 years agoRemoved dso.h
Jarkko Sakkinen [Thu, 8 Nov 2012 07:39:05 +0000 (09:39 +0200)]
Removed dso.h

We don't need this because we're using version script. Fixed init.c
accordingly.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
11 years agoDeclare smack_mnt as non-static in init.c.
Jarkko Sakkinen [Thu, 8 Nov 2012 07:33:19 +0000 (09:33 +0200)]
Declare smack_mnt as non-static in init.c.

Use it directly in libsmack.c. It will be declared as local symbol
in DSO because we declare visible symbols explicitly in libsmack.sym.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
11 years agoAdd support for smackfs directory: /sys/fs/smackfs/
Passion,Zhao [Mon, 5 Nov 2012 12:27:10 +0000 (20:27 +0800)]
Add support for smackfs directory: /sys/fs/smackfs/

Signed-off-by: Passion,Zhao <passion.zhao@intel.com>
Suggested-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
11 years agoMerge pull request #2 from PassionZhao/master
jarkkos [Fri, 2 Nov 2012 11:16:28 +0000 (04:16 -0700)]
Merge pull request #2 from PassionZhao/master

 Move cipso_free,cipso_new,cipso_apply from utils/common.c to libsmack/libsmack.c

11 years agoMove cipso_free,cipso_new,cipso_apply from utils/common.c to libsmack/libsmack.c
Passion,Zhao [Fri, 2 Nov 2012 09:24:27 +0000 (17:24 +0800)]
Move cipso_free,cipso_new,cipso_apply from utils/common.c to libsmack/libsmack.c
In libsmack/libsmack.c, move smack_cipso-* right after smack-access-*

11 years agoMerge pull request #1 from sofar/fixes
jarkkos [Mon, 29 Oct 2012 11:03:04 +0000 (04:03 -0700)]
Merge pull request #1 from sofar/fixes

smack.service: provide [Install] section in systemd unit file.

11 years agosmack.mount: "WantedBy" is illegal in [Unit] context.
Auke Kok [Wed, 24 Oct 2012 20:30:46 +0000 (13:30 -0700)]
smack.mount: "WantedBy" is illegal in [Unit] context.

There is no need to define a dependency or preferred mounting
point as smack.service already requires smack.mount to be
started, and smack.service forces itself to be part of
basic.target.

WantedBy additionally is illegal in [Unit] and so does
nothing but create a warning.

Since mounting smackfs without enabling smack.service doesn't
really do much, we opt out of putting Also=smack.mount in
smack.service.

11 years agosmack.service: provide [Install] section in systemd unit file.
Auke Kok [Wed, 24 Oct 2012 18:30:51 +0000 (11:30 -0700)]
smack.service: provide [Install] section in systemd unit file.

With this addition, one can `systemctl --enable smack.service`
to enable smack.service and smack.mount at boot time.

11 years agolibsmack: fallback to short labels
Jarkko Sakkinen [Tue, 25 Sep 2012 20:05:38 +0000 (23:05 +0300)]
libsmack: fallback to short labels

Use /smack/load and /smack/access as a fallback if kernel does not
have long label support.

11 years agoUpdate to latest Doxygen standard
Brian McGillion [Thu, 6 Sep 2012 12:27:12 +0000 (15:27 +0300)]
Update to latest Doxygen standard

12 years agoMust umount /smack before trying to remove it
Brian McGillion [Wed, 9 May 2012 07:42:38 +0000 (10:42 +0300)]
Must umount /smack before trying to remove it

12 years agoOptimize init script smack.rc
Joachim Wiedorn [Wed, 9 May 2012 07:19:29 +0000 (10:19 +0300)]
Optimize init script smack.rc

12 years agoAdd postinst + postrm scripts for Debian to create /smack directory
Joachim Wiedorn [Wed, 9 May 2012 06:05:29 +0000 (09:05 +0300)]
Add postinst + postrm scripts for Debian to create /smack directory

12 years agoUpdate copyright file for Debian
Joachim Wiedorn [Wed, 9 May 2012 06:02:43 +0000 (09:02 +0300)]
Update copyright file for Debian

12 years agoAdd libsmack1.symbols file for Debian
Joachim Wiedorn [Wed, 9 May 2012 05:58:45 +0000 (08:58 +0300)]
Add libsmack1.symbols file for Debian

12 years agoFull update of Debian control file
Joachim Wiedorn [Wed, 9 May 2012 05:57:30 +0000 (08:57 +0300)]
Full update of Debian control file

12 years agoRename Debian package name libsmack to libsmack1
Joachim Wiedorn [Wed, 9 May 2012 05:54:38 +0000 (08:54 +0300)]
Rename Debian package name libsmack to libsmack1

12 years agoCreate manpage links to existing manpages
Joachim Wiedorn [Wed, 9 May 2012 05:52:13 +0000 (08:52 +0300)]
Create manpage links to existing manpages

12 years agoFix warnings
Brian McGillion [Mon, 7 May 2012 12:03:01 +0000 (15:03 +0300)]
Fix warnings

12 years agoUtils: add debian init script and required directories
Brian McGillion [Mon, 7 May 2012 08:49:55 +0000 (11:49 +0300)]
Utils: add debian init script and required directories

12 years agoFix some typos in manpages
Joachim Wiedorn [Sun, 6 May 2012 08:36:01 +0000 (11:36 +0300)]
Fix some typos in manpages

Signed-off-by: Joachim Wiedorn <ad_debian@joonet.de>
12 years agoAdd man pages
Brian McGillion [Fri, 4 May 2012 13:21:06 +0000 (16:21 +0300)]
Add man pages

12 years agoUtils: Add long label support
Brian McGillion [Wed, 2 May 2012 15:39:43 +0000 (18:39 +0300)]
Utils: Add long label support

12 years agolibsmack: Add long label support
Brian McGillion [Wed, 2 May 2012 06:46:03 +0000 (09:46 +0300)]
libsmack: Add long label support

12 years agolibsmack: Ignore blank lines in the rules files
Brian McGillion [Wed, 2 May 2012 06:39:19 +0000 (09:39 +0300)]
libsmack: Ignore blank lines in the rules files

12 years agoInit: Dynamically check systemd installation path
Brian McGillion [Wed, 2 May 2012 06:34:55 +0000 (09:34 +0300)]
Init: Dynamically check systemd installation path

12 years agoAdd initial debian package support
Brian McGillion [Wed, 25 Apr 2012 09:06:57 +0000 (12:06 +0300)]
Add initial debian package support

12 years agoRemove unnecessary description from perror as there only exists one call to each...
Brian McGillion [Wed, 25 Apr 2012 07:55:31 +0000 (10:55 +0300)]
Remove unnecessary description from perror as there only exists one call to each method

12 years agoutils: improve smackcipso so that it loads also from stdin.
Jarkko Sakkinen [Wed, 22 Feb 2012 10:06:39 +0000 (12:06 +0200)]
utils: improve smackcipso so that it loads also from stdin.

Original smackutil smackcipso allowed to read cipso from
stdin. This adds the same feature here.

Conflicts:

utils/smackcipso.c

12 years agoAdd init scripts
Brian McGillion [Mon, 6 Feb 2012 15:40:31 +0000 (17:40 +0200)]
Add init scripts

12 years agoMerge pull request #10 from brianmcgillion/master
jarkkos [Thu, 15 Dec 2011 18:35:09 +0000 (10:35 -0800)]
Merge pull request #10 from brianmcgillion/master

Include guard fix

12 years agoImprove the include guard to avoid conflicts with applications
Brian McGillion [Thu, 15 Dec 2011 09:45:51 +0000 (11:45 +0200)]
Improve the include guard to avoid conflicts with applications

12 years agofixed libsmack.sym
Jarkko Sakkinen [Tue, 13 Dec 2011 13:14:45 +0000 (15:14 +0200)]
fixed libsmack.sym

12 years agolibsmack: revert smack_new_label_from_self()
Jarkko Sakkinen [Tue, 13 Dec 2011 09:52:08 +0000 (11:52 +0200)]
libsmack: revert smack_new_label_from_self()

Reverted smack_new_label_from_self() back. Removed
smack_set_self_label as it is not needed.

12 years agoutils: stdin support for smackload
Jarkko Sakkinen [Sun, 11 Dec 2011 17:02:49 +0000 (19:02 +0200)]
utils: stdin support for smackload

12 years agoutils: cleaned up common code for applying rules.
Jarkko Sakkinen [Sun, 11 Dec 2011 16:51:57 +0000 (18:51 +0200)]
utils: cleaned up common code for applying rules.

12 years agoAdded smack_get_self_label().
Jarkko Sakkinen [Sat, 10 Dec 2011 22:21:49 +0000 (00:21 +0200)]
Added smack_get_self_label().

12 years agoAdded smack_set_self_label().
Jarkko Sakkinen [Sat, 10 Dec 2011 21:33:28 +0000 (23:33 +0200)]
Added smack_set_self_label().

12 years agoFix: common.h was not part of the dist.
Jarkko Sakkinen [Wed, 30 Nov 2011 08:23:35 +0000 (10:23 +0200)]
Fix: common.h was not part of the dist.

12 years agoutils/Makefile.am: fixed installation path.
Jarkko Sakkinen [Wed, 16 Nov 2011 11:09:04 +0000 (13:09 +0200)]
utils/Makefile.am: fixed installation path.

12 years agoMerge pull request #5 from brianmcgillion/master
jarkkos [Tue, 15 Nov 2011 12:12:56 +0000 (04:12 -0800)]
Merge pull request #5 from brianmcgillion/master

extern keyword missing

12 years agoMerge branch 'master' of https://github.com/jarkkos/smack
Brian McGillion [Tue, 15 Nov 2011 12:04:24 +0000 (14:04 +0200)]
Merge branch 'master' of https://github.com/jarkkos/smack

12 years agolibsmack: Fix missing extern qualifier
Brian McGillion [Tue, 15 Nov 2011 12:02:42 +0000 (14:02 +0200)]
libsmack: Fix missing extern qualifier

12 years agoMerge pull request #4 from brianmcgillion/ac028f67ba540b74d2f7d9b169ceaff548ba5f43
jarkkos [Tue, 15 Nov 2011 11:58:58 +0000 (03:58 -0800)]
Merge pull request #4 from brianmcgillion/ac028f67ba540b74d2f7d9b169ceaff548ba5f43

Add chsmack

12 years agoMerge branch 'master' of https://github.com/jarkkos/smack
Brian McGillion [Tue, 15 Nov 2011 11:46:49 +0000 (13:46 +0200)]
Merge branch 'master' of https://github.com/jarkkos/smack

12 years agolibsmack: fixed smack.h installation path
Jarkko Sakkinen [Tue, 15 Nov 2011 11:43:14 +0000 (13:43 +0200)]
libsmack: fixed smack.h installation path

12 years agoMerge branch 'master' of github.com:brianmcgillion/smack
Brian McGillion [Tue, 15 Nov 2011 10:17:27 +0000 (12:17 +0200)]
Merge branch 'master' of github.com:brianmcgillion/smack

12 years agochsmack: Add chsmack from smackutils
Brian McGillion [Tue, 15 Nov 2011 10:07:07 +0000 (12:07 +0200)]
chsmack: Add chsmack from smackutils

12 years agochsmack: Add chsmack from smackutils
Brian McGillion [Tue, 15 Nov 2011 10:07:07 +0000 (12:07 +0200)]
chsmack: Add chsmack from smackutils

12 years agoMerge pull request #2 from brianmcgillion/master
jarkkos [Tue, 15 Nov 2011 10:04:23 +0000 (02:04 -0800)]
Merge pull request #2 from brianmcgillion/master

Fix changes in coding convention

12 years agoutils: Fix the coding conventions
Brian McGillion [Tue, 15 Nov 2011 09:54:43 +0000 (11:54 +0200)]
utils: Fix the coding conventions

12 years agoMerge pull request #1 from brianmcgillion/master
jarkkos [Fri, 11 Nov 2011 14:01:58 +0000 (06:01 -0800)]
Merge pull request #1 from brianmcgillion/master

Commits as agreed

12 years agoMerge branches
Brian McGillion [Fri, 11 Nov 2011 13:40:22 +0000 (15:40 +0200)]
Merge branches

12 years agoBootstrap with autogen
Brian McGillion [Fri, 11 Nov 2011 12:58:54 +0000 (14:58 +0200)]
Bootstrap with autogen

12 years agofixed package information
Jarkko Sakkinen [Fri, 11 Nov 2011 12:42:37 +0000 (14:42 +0200)]
fixed package information

12 years agoAdd initial daemon
Brian McGillion [Fri, 11 Nov 2011 12:33:10 +0000 (14:33 +0200)]
Add initial daemon

12 years agolibsmack: smack_accesses_new_from_file -> smack_accesses_add_from_file
Jarkko Sakkinen [Fri, 11 Nov 2011 09:49:42 +0000 (11:49 +0200)]
libsmack: smack_accesses_new_from_file -> smack_accesses_add_from_file

12 years agosmackctl: fixed a memory leak in cipso_free()
Jarkko Sakkinen [Fri, 11 Nov 2011 09:34:52 +0000 (11:34 +0200)]
smackctl: fixed a memory leak in cipso_free()

12 years agoAdd smackcipso
Brian McGillion [Fri, 11 Nov 2011 08:47:49 +0000 (10:47 +0200)]
Add smackcipso

12 years agoAdd usage
Brian McGillion [Fri, 11 Nov 2011 08:34:04 +0000 (10:34 +0200)]
Add usage

12 years agoCreate smackload based on libsmack
Brian McGillion [Fri, 11 Nov 2011 08:25:42 +0000 (10:25 +0200)]
Create smackload based on libsmack

12 years agoCreate common files for shared util components
Brian McGillion [Fri, 11 Nov 2011 08:01:56 +0000 (10:01 +0200)]
Create common files for shared util components

12 years agoBootstrap with autogen
Brian McGillion [Thu, 10 Nov 2011 18:22:03 +0000 (20:22 +0200)]
Bootstrap with autogen

12 years agoAdded forgotten -Wall -Wextra compilation options and fixed
Jarkko Sakkinen [Thu, 10 Nov 2011 15:49:40 +0000 (17:49 +0200)]
Added forgotten -Wall -Wextra compilation options and fixed
warnings.

12 years agoRest of the libsmack specific to libsmack/Makefile.am
Jarkko Sakkinen [Thu, 10 Nov 2011 14:18:15 +0000 (16:18 +0200)]
Rest of the libsmack specific to libsmack/Makefile.am

12 years agoMoved libsmack.pc.in under libsmack directory.
Jarkko Sakkinen [Thu, 10 Nov 2011 13:45:36 +0000 (15:45 +0200)]
Moved libsmack.pc.in under libsmack directory.

12 years agofixed distcheck
Jarkko Sakkinen [Thu, 10 Nov 2011 13:33:42 +0000 (15:33 +0200)]
fixed distcheck

12 years agoreverted to smack.h
Jarkko Sakkinen [Thu, 10 Nov 2011 11:27:35 +0000 (13:27 +0200)]
reverted to smack.h

12 years agoadjusted apply/clear API
Jarkko Sakkinen [Thu, 10 Nov 2011 10:50:12 +0000 (12:50 +0200)]
adjusted apply/clear API

12 years agoAdjusted self label and peer label API.
Jarkko Sakkinen [Thu, 10 Nov 2011 10:34:18 +0000 (12:34 +0200)]
Adjusted self label and peer label API.

12 years agoCleaned up factory methods.
Jarkko Sakkinen [Thu, 10 Nov 2011 10:18:40 +0000 (12:18 +0200)]
Cleaned up factory methods.

12 years agocleaned up smackaccess and made more scriptable
Jarkko Sakkinen [Thu, 10 Nov 2011 09:38:37 +0000 (11:38 +0200)]
cleaned up smackaccess and made more scriptable

12 years agorenamed tests to utils
Jarkko Sakkinen [Thu, 10 Nov 2011 09:24:42 +0000 (11:24 +0200)]
renamed tests to utils

12 years agoInstall utilities under tests/ to bidir.
Jarkko Sakkinen [Thu, 10 Nov 2011 09:21:21 +0000 (11:21 +0200)]
Install utilities under tests/ to bidir.

12 years agoremoved extern keywords
Jarkko Sakkinen [Wed, 9 Nov 2011 21:37:24 +0000 (23:37 +0200)]
removed extern keywords

12 years agoSmackRuleSet => struct smack_accesses
Jarkko Sakkinen [Wed, 9 Nov 2011 21:35:50 +0000 (23:35 +0200)]
SmackRuleSet => struct smack_accesses

12 years agoAdded version script.
Jarkko Sakkinen [Wed, 9 Nov 2011 21:25:29 +0000 (23:25 +0200)]
Added version script.

12 years agoPut .gitignore files in plac
Jarkko Sakkinen [Wed, 9 Nov 2011 21:10:50 +0000 (23:10 +0200)]
Put .gitignore files in plac

12 years agoremoved ChangeLog
Jarkko Sakkinen [Wed, 9 Nov 2011 21:03:18 +0000 (23:03 +0200)]
removed ChangeLog

12 years agoremove AUTHORS
Jarkko Sakkinen [Wed, 9 Nov 2011 21:02:22 +0000 (23:02 +0200)]
remove AUTHORS

12 years agoFixed m4 directory handling in Makefile.am
Jarkko Sakkinen [Wed, 9 Nov 2011 21:00:45 +0000 (23:00 +0200)]
Fixed m4 directory handling in Makefile.am

12 years agoconfigure.ac: cleanup
Jarkko Sakkinen [Wed, 9 Nov 2011 20:26:18 +0000 (22:26 +0200)]
configure.ac: cleanup

12 years agosmack.h/c -> libsmack.h/c
Jarkko Sakkinen [Wed, 9 Nov 2011 20:16:18 +0000 (22:16 +0200)]
smack.h/c -> libsmack.h/c

12 years agochanged include dir to /usr/include
Jarkko Sakkinen [Wed, 9 Nov 2011 19:16:36 +0000 (21:16 +0200)]
changed include dir to /usr/include