~ubuntu-branches/ubuntu/lucid/openssh/lucid

« back to all changes in this revision

Viewing changes to ssh-agent.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-01-26 13:07:40 UTC
  • mfrom: (1.13.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100126130740-d7r70jqrqlbvz3r0
Tags: 1:5.3p1-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Add support for registering ConsoleKit sessions on login.
  - Drop openssh-blacklist and openssh-blacklist-extra to Suggests; they
    take up a lot of CD space, and I suspect that rolling them out in
    security updates has covered most affected systems now.
  - Convert to Upstart.  The init script is still here for the benefit of
    people running sshd in chroots.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $OpenBSD: ssh-agent.c,v 1.159 2008/06/28 14:05:15 djm Exp $ */
 
1
/* $OpenBSD: ssh-agent.c,v 1.161 2009/03/23 19:38:04 tobias Exp $ */
2
2
/*
3
3
 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4
4
 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
1061
1061
        pid_t pid;
1062
1062
        char pidstrbuf[1 + 3 * sizeof pid];
1063
1063
        struct timeval *tvp = NULL;
 
1064
        size_t len;
1064
1065
 
1065
1066
        /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
1066
1067
        sanitise_stdfd();
1121
1122
 
1122
1123
        if (ac == 0 && !c_flag && !s_flag) {
1123
1124
                shell = getenv("SHELL");
1124
 
                if (shell != NULL &&
1125
 
                    strncmp(shell + strlen(shell) - 3, "csh", 3) == 0)
 
1125
                if (shell != NULL && (len = strlen(shell)) > 2 &&
 
1126
                    strncmp(shell + len - 3, "csh", 3) == 0)
1126
1127
                        c_flag = 1;
1127
1128
        }
1128
1129
        if (k_flag) {