--- setfiles/psid.c~ 2003-06-02 16:23:07.000000000 -0400 +++ setfiles/psid.c 2003-07-13 02:10:38.000000000 -0400 @@ -658,10 +658,12 @@ */ DPRINTF("chpsid: adding new entry to contexts\n"); - rc = lseek(t->contexts_fp, 0, SEEK_END); - if (rc < 0) { + len = strlen(context)+1; + + off = lseek(t->contexts_fp, 0, SEEK_END); + if (off < 0) { perror("lseek"); - return rc; + return off; } rc = write(t->contexts_fp, context, len); if (rc < 0) {