]> andersk Git - gssapi-openssh.git/blobdiff - openssh/gss-serv-krb5.c
Merge from OPENSSH_3_8_1P1_GSSAPI_20040713 to OPENSSH_3_9P1_GSSAPI_20040818.
[gssapi-openssh.git] / openssh / gss-serv-krb5.c
index 485ecd61fc0b54419003c374ad853fe2ca188aa4..24929dc7b3ff5a71277463ca89a7b05c3a3b0aa9 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: gss-serv-krb5.c,v 1.2 2003/11/21 11:57:03 djm Exp $   */
+/*     $OpenBSD: gss-serv-krb5.c,v 1.3 2004/07/21 10:36:23 djm Exp $   */
 
 /*
  * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
@@ -77,7 +77,7 @@ ssh_gssapi_mech gssapi_kerberos_mech_old = {
 /* Initialise the krb5 library, for the stuff that GSSAPI won't do */
 
 static int
-ssh_gssapi_krb5_init()
+ssh_gssapi_krb5_init(void)
 {
        krb5_error_code problem;
 
@@ -188,11 +188,15 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
        {
                int tmpfd;
                char ccname[40];
+               mode_t old_umask;
 
                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;
                        return;
This page took 0.038469 seconds and 4 git commands to generate.