(void)signal(SIGTSTP, SIG_IGN);
tbuf[0] = '-';
- (void)strcpy(tbuf + 1, (p = rindex(shell, '/')) ? p + 1 : shell);
+ (void)strcpy(tbuf + 1, (p = strrchr(shell, '/')) ? p + 1 : shell);
sia_ses_release(&entity);
execlp(shell, tbuf, 0);
(void)printf("login: no shell: %s.\n", strerror(errno));
if(!fgets(string, size, stream) || ferror(stream) || errno == EINTR)
return NULL;
else
- if(cp=index(string, '\n'))
+ if(cp=strchr(string, '\n'))
*cp = '\0';
else
while((c=getc(stdin)) != '\n' && c != EOF && errno != EINTR)