projects
/
platform
/
core
/
uifw
/
stt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc4df9c
)
Fix bug about checking privilege
23/82423/1
author
Kwangyoun Kim
<ky85.kim@samsung.com>
Wed, 3 Aug 2016 08:34:53 +0000
(17:34 +0900)
committer
Kwangyoun Kim
<ky85.kim@samsung.com>
Wed, 3 Aug 2016 08:35:20 +0000
(17:35 +0900)
Change-Id: Ie8c44e7a494ef1f5d928437ab61fbf8ddce32c0d
Signed-off-by: Kwangyoun Kim <ky85.kim@samsung.com>
client/stt.c
[changed mode: 0755->0644]
patch
|
blob
|
history
diff --git
a/client/stt.c
b/client/stt.c
old mode 100755
(executable)
new mode 100644
(file)
index
34e95cf
..
daf4ce3
--- a/
client/stt.c
+++ b/
client/stt.c
@@
-92,13
+92,14
@@
static int __check_privilege_initialize()
static int __check_privilege(const char* uid, const char * privilege)
{
FILE *fp = NULL;
- char smack_label[1024] = "/proc/self/attr/current";
+ char label_path[1024] = "/proc/self/attr/current";
+ char smack_label[1024] = {'\0',};
if (!p_cynara) {
return false;
}
- fp = fopen(
smack_label
, "r");
+ fp = fopen(
label_path
, "r");
if (fp != NULL) {
if (fread(smack_label, 1, sizeof(smack_label), fp) <= 0)
SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to fread");