~ubuntu-branches/ubuntu/karmic/dante/karmic

« back to all changes in this revision

Viewing changes to dlib/broken.c

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2006-10-19 12:09:39 UTC
  • mfrom: (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20061019120939-t818x24e2tn8be5k
Tags: 1.1.18-2.1
* Non-maintainer upload for RC bug.
* Make sure changelogs are installed into all packages (Closes: #393568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * $Id: broken.c,v 1.14 2003/07/01 13:21:25 michaels Exp $
3
 
 *
4
 
 * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2003
5
 
 *      Inferno Nettverk A/S, Norway.  All rights reserved.
6
 
 *
7
 
 * Redistribution and use in source and binary forms, with or without
8
 
 * modification, are permitted provided that the following conditions
9
 
 * are met:
10
 
 * 1. The above copyright notice, this list of conditions and the following
11
 
 *    disclaimer must appear in all copies of the software, derivative works
12
 
 *    or modified versions, and any portions thereof, aswell as in all
13
 
 *    supporting documentation.
14
 
 * 2. All advertising materials mentioning features or use of this software
15
 
 *    must display the following acknowledgement:
16
 
 *      This product includes software developed by
17
 
 *      Inferno Nettverk A/S, Norway.
18
 
 * 3. The name of the author may not be used to endorse or promote products
19
 
 *    derived from this software without specific prior written permission.
20
 
 *
21
 
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22
 
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23
 
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24
 
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25
 
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26
 
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
 
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
 
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
 
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30
 
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
 
 *
32
 
 * Inferno Nettverk A/S requests users of this software to return to
33
 
 *
34
 
 *  Software Distribution Coordinator  or  sdc@inet.no
35
 
 *  Inferno Nettverk A/S
36
 
 *  Oslo Research Park
37
 
 *  Gaustadall�en 21
38
 
 *  NO-0349 Oslo
39
 
 *  Norway
40
 
 *
41
 
 * any improvements or extensions that they make and grant Inferno Nettverk A/S
42
 
 * the rights to redistribute these changes.
43
 
 *
44
 
 */
45
 
 
46
 
#include "common.h"
47
 
 
48
 
static const char rcsid[] =
49
 
"$Id: broken.c,v 1.14 2003/07/01 13:21:25 michaels Exp $";
50
 
 
51
 
#if HAVE_SHADOW_H && HAVE_GETSPNAM
52
 
#include <shadow.h>
53
 
#endif /* HAVE_SHADOW_H && HAVE_GETSPNAM */
54
 
 
55
 
struct passwd *
56
 
socks_getpwnam(login)
57
 
        const char *login;
58
 
{
59
 
        struct passwd *pwd;
60
 
 
61
 
        if ((pwd = getpwnam(login)) == NULL)
62
 
                return NULL;
63
 
 
64
 
#if HAVE_GETSPNAM /* broken sysv stuff. */
65
 
        {
66
 
        struct spwd *spwd;
67
 
 
68
 
        if ((spwd = getspnam(login)) != NULL)
69
 
                pwd->pw_passwd = spwd->sp_pwdp;
70
 
        }
71
 
#elif HAVE_GETPRPWNAM /* some other broken stuff. */
72
 
        /*
73
 
         * XXX, don't know how this looks yet.
74
 
        */
75
 
        /* getprpwnam(login); */
76
 
#endif
77
 
 
78
 
        return pwd;
79
 
}