Code Review
/
src
/
app-framework-main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
documentation: adds required-binding entry
[src/app-framework-main.git]
/
src
/
secmgr-wrap.c
diff --git
a/src/secmgr-wrap.c
b/src/secmgr-wrap.c
index
996f924
..
fee9d64
100644
(file)
--- a/
src/secmgr-wrap.c
+++ b/
src/secmgr-wrap.c
@@
-1,6
+1,8
@@
/*
Copyright 2015 IoT.bzh
/*
Copyright 2015 IoT.bzh
+ author: José Bollo <jose.bollo@iot.bzh>
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
@@
-34,7
+36,7
@@
static int retcode(enum lib_retcode rc)
case SECURITY_MANAGER_ERROR_REQ_NOT_COMPLETE: errno = EBADMSG; break;
case SECURITY_MANAGER_ERROR_AUTHENTICATION_FAILED: errno = EPERM; break;
case SECURITY_MANAGER_ERROR_ACCESS_DENIED: errno = EACCES; break;
case SECURITY_MANAGER_ERROR_REQ_NOT_COMPLETE: errno = EBADMSG; break;
case SECURITY_MANAGER_ERROR_AUTHENTICATION_FAILED: errno = EPERM; break;
case SECURITY_MANAGER_ERROR_ACCESS_DENIED: errno = EACCES; break;
- default: errno =
0
; break;
+ default: errno =
ECANCELED
; break;
}
return -1;
}
}
return -1;
}
@@
-78,6
+80,17
@@
int secmgr_install()
return retcode(rc);
}
return retcode(rc);
}
+int secmgr_uninstall()
+{
+ int rc;
+ assert(request != NULL);
+ rc = security_manager_app_uninstall(request);
+ if (rc != SECURITY_MANAGER_SUCCESS)
+ ERROR("security_manager_app_uninstall failed");
+ secmgr_cancel();
+ return retcode(rc);
+}
+
int secmgr_permit(const char *permission)
{
int rc;
int secmgr_permit(const char *permission)
{
int rc;