~ubuntu-branches/ubuntu/maverick/krb5/maverick

« back to all changes in this revision

Viewing changes to src/lib/krb4/kuserok.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-10-30 10:28:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20061030102853-x7v876vw4af46v0m
Tags: 1.4.4-3ubuntu1
* Merge with Debian; only Ubuntu change:
  - src/include/k5-thread.h: Define__USE_GNU when #include'ing pthread.h to
    fix FTBFS (from 1.4.3-9ubuntu1).

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
         */
164
164
        if(getuid() == 0) {
165
165
          uid_t old_euid = geteuid();
166
 
          if (seteuid(old_euid) < 0)
 
166
          if (seteuid(pwd->pw_uid) < 0)
167
167
              return NOTOK;
 
168
 
168
169
          fp = fopen(pbuf, "r");
169
170
          if (seteuid(old_euid) < 0)
170
171
              return NOTOK;
171
 
 
172
172
          if ((fp) == NULL) {
173
173
            return(NOTOK);
174
174
          }