Skip to content

Commit

Permalink
SELinux: security_read_policy should take a size_t not ssize_t
Browse files Browse the repository at this point in the history
The len should be an size_t but is a ssize_t.  Easy enough fix to silence
build warnings.  We have no need for signed-ness.

Signed-off-by: Eric Paris <eparis@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
  • Loading branch information
Eric Paris committed Apr 25, 2011
1 parent a35c6c8 commit 6b69732
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion security/selinux/include/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ extern int selinux_policycap_openperm;
int security_mls_enabled(void);

int security_load_policy(void *data, size_t len);
int security_read_policy(void **data, ssize_t *len);
int security_read_policy(void **data, size_t *len);
size_t security_policydb_len(void);

int security_policycap_supported(unsigned int req_cap);
Expand Down
2 changes: 1 addition & 1 deletion security/selinux/ss/services.c
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,7 @@ int security_netlbl_sid_to_secattr(u32 sid, struct netlbl_lsm_secattr *secattr)
* @len: length of data in bytes
*
*/
int security_read_policy(void **data, ssize_t *len)
int security_read_policy(void **data, size_t *len)
{
int rc;
struct policy_file fp;
Expand Down

0 comments on commit 6b69732

Please sign in to comment.