platform/upstream/smack.git
13 years agoAPI cleanup.
Jarkko Sakkinen [Sun, 30 Jan 2011 13:23:58 +0000 (05:23 -0800)]
API cleanup.

13 years agoRefactored smack_rule_set_list away for full rule set iterator.
Jarkko Sakkinen [Sun, 30 Jan 2011 13:16:41 +0000 (05:16 -0800)]
Refactored smack_rule_set_list away for full rule set iterator.

13 years agoAdded function smack_rule_set_list to iterate over rules.
Jarkko Sakkinen [Sat, 29 Jan 2011 16:38:26 +0000 (08:38 -0800)]
Added function smack_rule_set_list to iterate over rules.

13 years agoUpdated API documentation.
Jarkko Sakkinen [Sat, 29 Jan 2011 14:17:26 +0000 (06:17 -0800)]
Updated API documentation.

13 years agoUpdate documentation comments.
Jarkko Sakkinen [Wed, 26 Jan 2011 13:42:49 +0000 (05:42 -0800)]
Update documentation comments.

13 years agoapi fixes
Jarkko Sakkinen [Wed, 26 Jan 2011 13:37:59 +0000 (05:37 -0800)]
api fixes

13 years agoAPI cleanup for save functions
Jarkko Sakkinen [Wed, 26 Jan 2011 13:18:29 +0000 (05:18 -0800)]
API cleanup for save functions

13 years agoAPI clean up for SmackRuleSet constructor
Jarkko Sakkinen [Wed, 26 Jan 2011 13:16:52 +0000 (05:16 -0800)]
API clean up for SmackRuleSet constructor

13 years agoAPI cleanup.
Jarkko Sakkinen [Wed, 26 Jan 2011 11:49:35 +0000 (03:49 -0800)]
API cleanup.

13 years agoRefine libsmack API. Variable length labels functionality
Jarkko Sakkinen [Wed, 26 Jan 2011 10:42:54 +0000 (02:42 -0800)]
Refine libsmack API. Variable length labels functionality
to be moved into libsmackman.

13 years agofix
Jarkko Sakkinen [Wed, 26 Jan 2011 16:04:40 +0000 (08:04 -0800)]
fix

13 years agoCode coverage fixes.
Jarkko Sakkinen [Tue, 18 Jan 2011 10:46:33 +0000 (02:46 -0800)]
Code coverage fixes.

13 years agoRemoved smack_create_default_config_files().
Jarkko Sakkinen [Tue, 18 Jan 2011 07:23:41 +0000 (23:23 -0800)]
Removed smack_create_default_config_files().

13 years agoFixed invalid sizeof usage in smack_xattr.c.
Jarkko Sakkinen [Mon, 17 Jan 2011 09:22:46 +0000 (01:22 -0800)]
Fixed invalid sizeof usage in smack_xattr.c.

13 years agoRemoved autotools generated files from the project.
Jarkko Sakkinen [Sat, 15 Jan 2011 12:56:47 +0000 (04:56 -0800)]
Removed autotools generated files from the project.

13 years agoAdded smack_label_set_get_short_name()
Jarkko Sakkinen [Fri, 14 Jan 2011 13:50:28 +0000 (05:50 -0800)]
Added smack_label_set_get_short_name()

13 years agoChanged check_xattr API not to do memory allocation.
Jarkko Sakkinen [Fri, 14 Jan 2011 12:09:05 +0000 (04:09 -0800)]
Changed check_xattr API not to do memory allocation.
Simpler to use now from libcreds3.

13 years agoAdded SMACK64MMAP constant for using the corresponding
Jarkko Sakkinen [Fri, 7 Jan 2011 12:57:57 +0000 (14:57 +0200)]
Added SMACK64MMAP constant for using the corresponding
extended attribute.

13 years agoFix package group for -devel package
Mika Bostrom [Fri, 3 Dec 2010 13:44:26 +0000 (15:44 +0200)]
Fix package group for -devel package

This removes a valid rpmlint warning.

13 years agoBuildRequire on uthash-devel 1.9.3+
Mika Bostrom [Fri, 3 Dec 2010 12:58:36 +0000 (14:58 +0200)]
BuildRequire on uthash-devel 1.9.3+

13 years agoRevert "Use embedded uthash"
Mika Bostrom [Fri, 3 Dec 2010 12:56:19 +0000 (14:56 +0200)]
Revert "Use embedded uthash"

This reverts commit 0abe6836d4b43bfda1d1bdfb717d224325257ff0.

Since we can use system's uthash, change back to original build rules.

13 years agoRevert "Import uthash-1.9.3 as a 3rd-party item"
Mika Bostrom [Fri, 3 Dec 2010 12:50:29 +0000 (14:50 +0200)]
Revert "Import uthash-1.9.3 as a 3rd-party item"

This reverts commit 42b08e49bc64c3b92150a4d2700128d0bc6a1f80.

Do not embed uthash after all. Not having it here makes it easier to
integrate libsmack into MeeGo Core, and we now have uthash-devel 1.9.3
available.

13 years agoFixed sprintf() for outputting the short label.
Jarkko Sakkinen [Fri, 3 Dec 2010 13:28:22 +0000 (05:28 -0800)]
Fixed sprintf() for outputting the short label.

13 years agoHash calculation.
Jarkko Sakkinen [Fri, 3 Dec 2010 07:38:26 +0000 (23:38 -0800)]
Hash calculation.

13 years agoCleaned up labels implementation.
Jarkko Sakkinen [Fri, 3 Dec 2010 06:57:38 +0000 (22:57 -0800)]
Cleaned up labels implementation.

13 years agoRead rules with long labels when parameter 'labels' is given.
Jarkko Sakkinen [Fri, 3 Dec 2010 06:53:42 +0000 (22:53 -0800)]
Read rules with long labels when parameter 'labels' is given.

13 years agoSave rules with long labels when parameter 'labels' is given.
Jarkko Sakkinen [Fri, 3 Dec 2010 05:49:02 +0000 (21:49 -0800)]
Save rules with long labels when parameter 'labels' is given.

13 years agoBuildRequire on libattr-devel
Mika Bostrom [Thu, 2 Dec 2010 05:17:27 +0000 (07:17 +0200)]
BuildRequire on libattr-devel

13 years agoBuildRequire on check-devel 0.9.4+
Mika Bostrom [Thu, 2 Dec 2010 05:05:34 +0000 (07:05 +0200)]
BuildRequire on check-devel 0.9.4+

An autobuilder requires to declare complete build dependencies.

13 years agoUse embedded uthash
Mika Bostrom [Thu, 2 Dec 2010 04:59:04 +0000 (06:59 +0200)]
Use embedded uthash

Disable checking of system-wide uthash libraries, provide the local path
header search path for libsmack build.

13 years agoImport uthash-1.9.3 as a 3rd-party item
Mika Bostrom [Thu, 2 Dec 2010 04:50:57 +0000 (06:50 +0200)]
Import uthash-1.9.3 as a 3rd-party item

There is no uthash package for meego 1.1, so we need an in-tree copy.

Uthash license: BSD, embedding allowed.

13 years agoTemporary function smack_create_default_config_files().
Jarkko Sakkinen [Tue, 30 Nov 2010 12:44:12 +0000 (04:44 -0800)]
Temporary function smack_create_default_config_files().

13 years agoFixed crash in smack_label_set_add() when add_label() returns
Jarkko Sakkinen [Tue, 30 Nov 2010 12:08:43 +0000 (04:08 -0800)]
Fixed crash in smack_label_set_add() when add_label() returns
NULL. Thanks to Tero Aho for reporting this issue.

13 years agoCreated defines for default paths.
Jarkko Sakkinen [Tue, 30 Nov 2010 12:05:04 +0000 (04:05 -0800)]
Created defines for default paths.

13 years agoClear rules from kernel.
Jarkko Sakkinen [Mon, 29 Nov 2010 05:50:59 +0000 (21:50 -0800)]
Clear rules from kernel.

13 years agoIn smack_rule_set_save_to_kernel, write removed rules with access
Jarkko Sakkinen [Mon, 29 Nov 2010 05:10:15 +0000 (21:10 -0800)]
In smack_rule_set_save_to_kernel, write removed rules with access
string "----". This is achieved by setting ac to zero when rule is
removed instead of deleting it.

13 years agoPass label set as parameter in rule set API instead of attach
Jarkko Sakkinen [Sat, 27 Nov 2010 21:46:16 +0000 (13:46 -0800)]
Pass label set as parameter in rule set API instead of attach
function to make its usage more documented and robust. NULL
can be given if long label support is not needed. No function
in rule set API adds new labels to label set but checks against
existing repository.

13 years agoChanged return value of smack_rule_set_remove() to void.
Jarkko Sakkinen [Sat, 27 Nov 2010 15:58:08 +0000 (07:58 -0800)]
Changed return value of smack_rule_set_remove() to void.

13 years agoChanged return value of smack_label_set_remove() to void.
Jarkko Sakkinen [Sat, 27 Nov 2010 15:46:17 +0000 (07:46 -0800)]
Changed return value of smack_label_set_remove() to void.

13 years agoRepositioned label set API in smack.h.
Jarkko Sakkinen [Sat, 27 Nov 2010 15:44:02 +0000 (07:44 -0800)]
Repositioned label set API in smack.h.

13 years agosmack_label_set_add() returns now const pointer to the short name.
Jarkko Sakkinen [Sat, 27 Nov 2010 15:31:13 +0000 (07:31 -0800)]
smack_label_set_add() returns now const pointer to the short name.

13 years agoAutomake: Don't install HTML docs if they were not built.
Ahmed S. Darwish [Thu, 25 Nov 2010 16:17:51 +0000 (18:17 +0200)]
Automake: Don't install HTML docs if they were not built.

This avoids the error:

    install: cannot stat `./libsmack-doxygen-1.0.tar.gz': \
         No such file or directory.
    make[2]: *** [install-docDATA] Error 1

if 'Doxygen' was not available in the build environment.

13 years agoConfigure.ac: Mention that xattr.h belongs to libattr.
Ahmed S. Darwish [Thu, 25 Nov 2010 15:04:11 +0000 (17:04 +0200)]
Configure.ac: Mention that xattr.h belongs to libattr.

13 years agoFixed configure.ac so that configure script fails if uthash and/or
Jarkko Sakkinen [Thu, 25 Nov 2010 16:45:48 +0000 (08:45 -0800)]
Fixed configure.ac so that configure script fails if uthash and/or
libattr and their corresponding headers are not detected. Thanks to
Ahmed S. Darwish for reporting this issue.

13 years agoAdded "EXTRA_DIST=smack_internal.h" to src/Makefile.am.
Jarkko Sakkinen [Wed, 24 Nov 2010 18:30:03 +0000 (10:30 -0800)]
Added "EXTRA_DIST=smack_internal.h" to src/Makefile.am.

13 years agoKnown labels support.
Jarkko Sakkinen [Wed, 24 Nov 2010 17:57:07 +0000 (09:57 -0800)]
Known labels support.

13 years agoInternal include file.
Jarkko Sakkinen [Wed, 24 Nov 2010 16:50:45 +0000 (08:50 -0800)]
Internal include file.

13 years agoImplemented smack_label_set_get() and smack_label_set_remove().
Jarkko Sakkinen [Wed, 24 Nov 2010 16:12:10 +0000 (08:12 -0800)]
Implemented smack_label_set_get() and smack_label_set_remove().

13 years agoLabelset support to xattr API.
Jarkko Sakkinen [Wed, 24 Nov 2010 00:43:47 +0000 (16:43 -0800)]
Labelset support to xattr API.

13 years agoLabel set support to rule set API.
Jarkko Sakkinen [Tue, 23 Nov 2010 23:36:50 +0000 (15:36 -0800)]
Label set support to rule set API.

13 years agoHandle NULL parameter in smack_rule_set_delete() and
Jarkko Sakkinen [Tue, 23 Nov 2010 21:54:31 +0000 (13:54 -0800)]
Handle NULL parameter in smack_rule_set_delete() and
smack_label_set_delete() properly.

13 years agoLabel conversion test case.
Jarkko Sakkinen [Tue, 23 Nov 2010 02:52:25 +0000 (18:52 -0800)]
Label conversion test case.

13 years agoFixed implementation and added test cases for label set API.
Jarkko Sakkinen [Mon, 22 Nov 2010 17:22:33 +0000 (09:22 -0800)]
Fixed implementation and added test cases for label set API.

13 years agoImplemented labels API.
Jarkko Sakkinen [Mon, 22 Nov 2010 16:31:41 +0000 (08:31 -0800)]
Implemented labels API.

13 years agoLabel set API.
Jarkko Sakkinen [Mon, 22 Nov 2010 15:55:53 +0000 (07:55 -0800)]
Label set API.

13 years agoStreamline API once more for addition of label set API.
Jarkko Sakkinen [Mon, 22 Nov 2010 14:59:31 +0000 (06:59 -0800)]
Streamline API once more for addition of label set API.

13 years agoRemoved those parts of API that are not needed in RPM aegis plugin or
Jarkko Sakkinen [Mon, 22 Nov 2010 14:47:43 +0000 (06:47 -0800)]
Removed those parts of API that are not needed in RPM aegis plugin or
libcreds3. Can be readded later on if needed easily.

13 years agoSimplified smack_read_rules_from_file().
Jarkko Sakkinen [Thu, 18 Nov 2010 03:51:08 +0000 (19:51 -0800)]
Simplified smack_read_rules_from_file().

13 years agoStreamlined API.
Jarkko Sakkinen [Thu, 18 Nov 2010 03:21:50 +0000 (19:21 -0800)]
Streamlined API.

13 years agoRemoved flags parameter from smack_write_rules_to_file() and
Jarkko Sakkinen [Thu, 18 Nov 2010 03:06:32 +0000 (19:06 -0800)]
Removed flags parameter from smack_write_rules_to_file() and
separated new function smack_write_rules_to_kernel().

13 years agoAllocate object and subject from heap. This is preliminary step
Jarkko Sakkinen [Wed, 17 Nov 2010 22:38:32 +0000 (14:38 -0800)]
Allocate object and subject from heap. This is preliminary step
for implementing long labels.

13 years agoFixed test cases.
Jarkko Sakkinen [Wed, 17 Nov 2010 17:09:09 +0000 (09:09 -0800)]
Fixed test cases.

13 years agoAdded missing doc comments.
Jarkko Sakkinen [Wed, 17 Nov 2010 15:23:34 +0000 (07:23 -0800)]
Added missing doc comments.

13 years agosmack_write_rules_to_file() now takes SMACK_RULES_KERNEL flag
Jarkko Sakkinen [Wed, 17 Nov 2010 15:21:25 +0000 (07:21 -0800)]
smack_write_rules_to_file() now takes SMACK_RULES_KERNEL flag
instead of SMACK_FORMAT_KERNEL/CONFIG parameter.

13 years agosmack_remove_user()
Jarkko Sakkinen [Mon, 15 Nov 2010 19:18:02 +0000 (11:18 -0800)]
smack_remove_user()

13 years agosmack_add_user()
Jarkko Sakkinen [Mon, 15 Nov 2010 19:08:48 +0000 (11:08 -0800)]
smack_add_user()

13 years agoImplemented smack_get_user_label(). Fixed bug in internal function
Jarkko Sakkinen [Mon, 15 Nov 2010 18:58:20 +0000 (10:58 -0800)]
Implemented smack_get_user_label(). Fixed bug in internal function
update_user(). Now HASH_ADD_KEYPTR is correctly used instead of
HASH_ADD_STRING() since user name string is dynamically allocated.

13 years agoDivided implementation into three files: smack_rules.c, smack_users.c
Jarkko Sakkinen [Mon, 15 Nov 2010 16:02:52 +0000 (08:02 -0800)]
Divided implementation into three files: smack_rules.c, smack_users.c
and smack_xattr.c

13 years agoSeparated tests into three suites.
Jarkko Sakkinen [Mon, 15 Nov 2010 15:56:19 +0000 (07:56 -0800)]
Separated tests into three suites.

13 years agosmack_set_smackexec_to_file()
Jarkko Sakkinen [Mon, 15 Nov 2010 15:45:22 +0000 (07:45 -0800)]
smack_set_smackexec_to_file()

13 years agoFixed compiler warnings.
Jarkko Sakkinen [Mon, 15 Nov 2010 15:29:35 +0000 (07:29 -0800)]
Fixed compiler warnings.

13 years agoAdded missing includes.
Jarkko Sakkinen [Mon, 15 Nov 2010 15:28:01 +0000 (07:28 -0800)]
Added missing includes.

13 years agoCleaned up code. Made reading rules and users more atomic.
Jarkko Sakkinen [Mon, 15 Nov 2010 14:16:45 +0000 (06:16 -0800)]
Cleaned up code. Made reading rules and users more atomic.

13 years agoRead and write users db from file.
Jarkko Sakkinen [Mon, 15 Nov 2010 01:43:12 +0000 (17:43 -0800)]
Read and write users db from file.

13 years agoAdded flags parameter to smack_set_file_smack() and
Jarkko Sakkinen [Sat, 13 Nov 2010 16:20:08 +0000 (08:20 -0800)]
Added flags parameter to smack_set_file_smack() and
smack_get_file_smack().

14 years agosmack_set_proc_smack()
Jarkko Sakkinen [Sat, 13 Nov 2010 05:10:38 +0000 (21:10 -0800)]
smack_set_proc_smack()

14 years agoFine-tuned test cases.
Jarkko Sakkinen [Sat, 13 Nov 2010 00:30:25 +0000 (16:30 -0800)]
Fine-tuned test cases.

14 years agoAdded format parameter to the smack_write_rules() that allows to
Jarkko Sakkinen [Sat, 13 Nov 2010 00:24:18 +0000 (16:24 -0800)]
Added format parameter to the smack_write_rules() that allows to
select whether rules are written in format accepted by smackfs or
in format that is used in smack accesses files.

14 years agoCode cleanup.
Jarkko Sakkinen [Fri, 12 Nov 2010 18:36:53 +0000 (10:36 -0800)]
Code cleanup.

14 years agoInitial commit
Jarkko Sakkinen [Fri, 12 Nov 2010 01:47:14 +0000 (17:47 -0800)]
Initial commit