projects
/
framework
/
security
/
smack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f409c17
)
fix: smack_new_from_path() follow parameter
author
Jarkko Sakkinen
<jarkko.sakkinen@intel.com>
Mon, 3 Jun 2013 08:20:16 +0000
(11:20 +0300)
committer
Jarkko Sakkinen
<jarkko.sakkinen@intel.com>
Mon, 3 Jun 2013 08:20:16 +0000
(11:20 +0300)
Mistake in smack_new_from_path(). When follow is true getxattr()
should be called and lgetxattr() otherwise.
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
libsmack/libsmack.c
patch
|
blob
|
history
diff --git
a/libsmack/libsmack.c
b/libsmack/libsmack.c
index
7e86a5a
..
30a1ebf
100644
(file)
--- a/
libsmack/libsmack.c
+++ b/
libsmack/libsmack.c
@@
-548,8
+548,8
@@
int smack_new_label_from_path(const char *path, const char *xattr, int follow,
ssize_t ret = 0;
ret = follow ?
-
l
getxattr(path, xattr, NULL, 0) :
- getxattr(path, xattr, NULL, 0);
+ getxattr(path, xattr, NULL, 0) :
+
l
getxattr(path, xattr, NULL, 0);
if (ret < 0 && errno != ERANGE)
return -1;
@@
-558,8
+558,8
@@
int smack_new_label_from_path(const char *path, const char *xattr, int follow,
return -1;
ret = follow ?
-
l
getxattr(path, xattr, result, ret) :
- getxattr(path, xattr, result, ret);
+ getxattr(path, xattr, result, ret) :
+
l
getxattr(path, xattr, result, ret);
if (ret < 0) {
free(result);
return -1;