mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-28 22:36:24 +01:00
Added a crunched_here(char *path) function so crunched programs can find out
who they share bed and breakfast with.
This commit is contained in:
parent
3525074d14
commit
7d150b7705
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8664
@ -64,6 +64,21 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
|
||||
int crunched_here(char *path)
|
||||
{
|
||||
char *slash, *basename;
|
||||
struct stub *ep;
|
||||
|
||||
slash = strrchr(path, '/');
|
||||
basename = slash? slash+1 : path;
|
||||
|
||||
for(ep=entry_points; ep->name != NULL; ep++)
|
||||
if(!strcmp(basename, ep->name))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int crunched_main(int argc, char **argv)
|
||||
{
|
||||
struct stub *ep;
|
||||
|
Loading…
Reference in New Issue
Block a user