]> andersk Git - gssapi-openssh.git/blobdiff - openssh/auth-krb5.c
Import of OpenSSH 3.9p1
[gssapi-openssh.git] / openssh / auth-krb5.c
index a728ebac11042735dc259ac40a25073b45459332..a324ff15c03fb4a338a7b77219848f9f6771a815 100644 (file)
@@ -69,6 +69,7 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
        krb5_principal server;
        char ccname[40];
        int tmpfd;
+       mode_t old_umask;
 #endif
        krb5_error_code problem;
        krb5_ccache ccache = NULL;
@@ -147,7 +148,10 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
 
        snprintf(ccname,sizeof(ccname),"FILE:/tmp/krb5cc_%d_XXXXXX",geteuid());
 
-       if ((tmpfd = mkstemp(ccname+strlen("FILE:")))==-1) {
+       old_umask = umask(0177);
+       tmpfd = mkstemp(ccname + strlen("FILE:"));
+       umask(old_umask);
+       if (tmpfd == -1) {
                logit("mkstemp(): %.100s", strerror(errno));
                problem = errno;
                goto out;
This page took 0.207589 seconds and 4 git commands to generate.