Changeset 220


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

Fix problem with standalone trustfile (ticket #147).

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/Changelog

    r219 r220  
    112.5.3:
     2        * Fix problem in standalone trustfile, does not work correctly on
     3          group-writeable files (reported by David).
    24        * Option SetThrottle to throttle throughput for db download
    35        * Option SetConnectionTimeout to configure the client connection
  • 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.