aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/pam_filter/pam_filter.c8
-rw-r--r--modules/pam_group/pam_group.c5
-rw-r--r--modules/pam_listfile/pam_listfile.c2
-rw-r--r--modules/pam_namespace/pam_namespace.c4
-rw-r--r--modules/pam_time/pam_time.c2
-rw-r--r--modules/pam_timestamp/hmac_openssl_wrapper.c2
-rw-r--r--modules/pam_unix/support.c2
7 files changed, 12 insertions, 13 deletions
diff --git a/modules/pam_filter/pam_filter.c b/modules/pam_filter/pam_filter.c
index 6e6def37..a3c3bb24 100644
--- a/modules/pam_filter/pam_filter.c
+++ b/modules/pam_filter/pam_filter.c
@@ -103,7 +103,7 @@ static int process_args(pam_handle_t *pamh
pam_syslog(pamh, LOG_DEBUG, "will run filter %s", *filtername);
}
- levp = (char **) malloc(5*sizeof(char *));
+ levp = malloc(5*sizeof(char *));
if (levp == NULL) {
pam_syslog(pamh, LOG_CRIT, "no memory for environment of filter");
return -1;
@@ -152,7 +152,7 @@ static int process_args(pam_handle_t *pamh
}
size = SERVICE_OFFSET+strlen(tmp);
- levp[1] = (char *) malloc(size+1);
+ levp[1] = malloc(size+1);
if (levp[1] == NULL) {
pam_syslog(pamh, LOG_CRIT, "no memory for service name");
if (levp) {
@@ -176,7 +176,7 @@ static int process_args(pam_handle_t *pamh
}
size = USER_OFFSET+strlen(user);
- levp[2] = (char *) malloc(size+1);
+ levp[2] = malloc(size+1);
if (levp[2] == NULL) {
pam_syslog(pamh, LOG_CRIT, "no memory for user's name");
if (levp) {
@@ -198,7 +198,7 @@ static int process_args(pam_handle_t *pamh
size = TYPE_OFFSET+strlen(type);
- levp[3] = (char *) malloc(size+1);
+ levp[3] = malloc(size+1);
if (levp[3] == NULL) {
pam_syslog(pamh, LOG_CRIT, "no memory for type");
if (levp) {
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
index 2525e048..038306c7 100644
--- a/modules/pam_group/pam_group.c
+++ b/modules/pam_group/pam_group.c
@@ -87,7 +87,7 @@ read_field(const pam_handle_t *pamh, int fd, char **buf, int *from, int *state,
/* is buf set ? */
if (! *buf) {
- *buf = (char *) calloc(1, PAM_GROUP_BUFLEN+1);
+ *buf = calloc(1, PAM_GROUP_BUFLEN+1);
if (! *buf) {
pam_syslog(pamh, LOG_CRIT, "out of memory");
D(("no memory"));
@@ -530,8 +530,7 @@ static int mkgrplist(pam_handle_t *pamh, char *buf, gid_t **list, int len)
gid_t *tmp;
D(("allocating new block"));
- tmp = (gid_t *) realloc((*list)
- , sizeof(gid_t) * (blks += GROUP_BLK));
+ tmp = realloc((*list), sizeof(gid_t) * (blks += GROUP_BLK));
if (tmp != NULL) {
(*list) = tmp;
} else {
diff --git a/modules/pam_listfile/pam_listfile.c b/modules/pam_listfile/pam_listfile.c
index 937576fd..5561b9ea 100644
--- a/modules/pam_listfile/pam_listfile.c
+++ b/modules/pam_listfile/pam_listfile.c
@@ -106,7 +106,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
}
else if(!strcmp(mybuf,"file")) {
if (ifname) free (ifname);
- ifname = (char *)malloc(strlen(myval)+1);
+ ifname = malloc(strlen(myval)+1);
if (!ifname)
return PAM_BUF_ERR;
strcpy(ifname,myval);
diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
index 48690b8d..4d24d356 100644
--- a/modules/pam_namespace/pam_namespace.c
+++ b/modules/pam_namespace/pam_namespace.c
@@ -645,7 +645,7 @@ static int process_line(char *line, const char *home, const char *rhome,
sstr = strchr(ustr, ',');
poly->num_uids = count;
- poly->uid = (uid_t *) malloc(count * sizeof (uid_t));
+ poly->uid = malloc(count * sizeof (uid_t));
uidptr = poly->uid;
if (uidptr == NULL) {
goto erralloc;
@@ -1295,7 +1295,7 @@ static int check_inst_parent(char *ipath, struct instance_data *idata)
* admin explicitly instructs to ignore the instance parent
* mode by the "ignore_instance_parent_mode" argument).
*/
- inst_parent = (char *) malloc(strlen(ipath)+1);
+ inst_parent = malloc(strlen(ipath)+1);
if (!inst_parent) {
pam_syslog(idata->pamh, LOG_CRIT, "Error allocating pathname string");
return PAM_SESSION_ERR;
diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c
index 27913b9a..a45d8f49 100644
--- a/modules/pam_time/pam_time.c
+++ b/modules/pam_time/pam_time.c
@@ -139,7 +139,7 @@ read_field(const pam_handle_t *pamh, int fd, char **buf, int *from, int *state,
/* is buf set ? */
if (! *buf) {
- *buf = (char *) calloc(1, PAM_TIME_BUFLEN+1);
+ *buf = calloc(1, PAM_TIME_BUFLEN+1);
if (! *buf) {
pam_syslog(pamh, LOG_CRIT, "out of memory");
D(("no memory"));
diff --git a/modules/pam_timestamp/hmac_openssl_wrapper.c b/modules/pam_timestamp/hmac_openssl_wrapper.c
index 2549c1db..52f06158 100644
--- a/modules/pam_timestamp/hmac_openssl_wrapper.c
+++ b/modules/pam_timestamp/hmac_openssl_wrapper.c
@@ -268,7 +268,7 @@ hmac_management(pam_handle_t *pamh, int debug, void **out, size_t *out_length,
goto done;
}
- hmac_message = (unsigned char*)malloc(sizeof(unsigned char) * MAX_HMAC_LENGTH);
+ hmac_message = malloc(sizeof(unsigned char) * MAX_HMAC_LENGTH);
if (!hmac_message) {
pam_syslog(pamh, LOG_CRIT, "Not enough memory");
goto done;
diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
index a84ced60..31c5ecb6 100644
--- a/modules/pam_unix/support.c
+++ b/modules/pam_unix/support.c
@@ -687,7 +687,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
retval = get_pwd_hash(pamh, name, &pwd, &salt);
- data_name = (char *) malloc(sizeof(FAIL_PREFIX) + strlen(name));
+ data_name = malloc(sizeof(FAIL_PREFIX) + strlen(name));
if (data_name == NULL) {
pam_syslog(pamh, LOG_CRIT, "no memory for data-name");
} else {