}
num_krb5_enctypes = n;
- if (cached_types = malloc(strlen(enctypes)+1))
+ if ((cached_types = malloc(strlen(enctypes)+1)))
strcpy(cached_types, enctypes);
return 0;
* Do this before creating rpc connection since we won't need
* rpc connection if it fails!
*/
- if (limit_krb5_enctypes(&sec, uid)) {
+ if (limit_krb5_enctypes(&sec)) {
printerr(1, "WARNING: Failed while limiting krb5 "
"encryption types for user with uid %d\n",
uid);
if (sec.cred != GSS_C_NO_CREDENTIAL)
gss_release_cred(&min_stat, &sec.cred);
/* Restore euid to original value */
- if ((save_uid != -1) && (setfsuid(save_uid) != uid)) {
+ if (((int)save_uid != -1) && (setfsuid(save_uid) != (int)uid)) {
printerr(0, "WARNING: Failed to restore fsuid"
" to uid %d from %d\n", save_uid, uid);
}
{
uid_t uid;
- if (read(clp->krb5_fd, &uid, sizeof(uid)) < sizeof(uid)) {
+ if (read(clp->krb5_fd, &uid, sizeof(uid)) < (ssize_t)sizeof(uid)) {
printerr(0, "WARNING: failed reading uid from krb5 "
"upcall pipe: %s\n", strerror(errno));
return;
{
uid_t uid;
- if (read(clp->spkm3_fd, &uid, sizeof(uid)) < sizeof(uid)) {
+ if (read(clp->spkm3_fd, &uid, sizeof(uid)) < (ssize_t)sizeof(uid)) {
printerr(0, "WARNING: failed reading uid from spkm3 "
"upcall pipe: %s\n", strerror(errno));
return;
{
uid_t uid;
char *lbuf = NULL;
- int lbuflen = 0, code;
+ int lbuflen = 0;
char *p;
char *mech = NULL;
char *target = NULL;
goto out;
if (sscanf(p, "enctypes=%s", enctypes) != 1) {
printerr(0, "WARNING: handle_gssd_upcall: "
- "failed to parse target name "
+ "failed to parse encryption types "
"in upcall string '%s'\n", lbuf);
goto out;
}
if (parse_enctypes(enctypes) != 0) {
printerr(0, "WARNING: handle_gssd_upcall: "
- "parsing encryption types failed: errno %d\n", code);
+ "parsing encryption types failed: errno %d\n", errno);
}
}