realpath resolves symlinks back to their real paths. I ended up just compiling this as the binary wrapper and placing it in /usr/bin:
Code:
#include <stdio.h>
#include <limits.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
int i;
for (i = 1; i < argc; i++) {
char rp[PATH_MAX];
if (!realpath(argv[i], rp)) {
perror(argv[i]);
return 1;
} else {
printf("%s\n", rp);
}
}
return 0;
}
Hopefully that helps somebody, because trying to find it was a major pain.