Changeset 220 for trunk/src


Ignore:
Timestamp:
Feb 24, 2009, 9:18:45 PM (16 years ago)
Author:
katerina
Message:

Fix problem with standalone trustfile (ticket #147).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/trustfile.c

    r211 r220  
    8686#else
    8787#define UID_CAST long
     88#define HAVE_GETPWENT
     89#define SH_MUTEX_LOCK(a)   ((void)0)
     90#define SH_MUTEX_UNLOCK(a) ((void)0)
    8891#endif
    8992
     
    362365        SL_IRETURN(status, _("getfname"));
    363366#else
    364       strncat(rbuf, "/",   rsz-strlen(rbuf));
    365       strncat(rbuf, fname, rsz-strlen(rbuf));
     367      strncat(rbuf, "/",   rsz-strlen(rbuf)-1);
     368      strncat(rbuf, fname, rsz-strlen(rbuf)-1);
     369      rbuf[rsz-1] = '\0';
    366370#endif
    367371    }
     
    624628                  fprintf (stderr,
    625629                           "trustfile: uid=%ld, trusted_uid=%ld, match found --> OK\n",
    626                            (UID_CAST)(w->pw_uid), *u);
     630                           (UID_CAST)(w->pw_uid), (UID_CAST)(*u));
    627631#endif
    628632                  flag = 0;
Note: See TracChangeset for help on using the changeset viewer.