int symlink(const char *oldpath, const char *pathname) { static int (*real_symlink)(const char *oldpath, const char *pathname) = NULL; const char *p; int ret; GET_PATH(symlink); if (p) { ret = real_symlink(oldpath, p); PUT_PATH(-1); } return real_symlink(oldpath, pathname); }
int symlink(char *topath,char *frompath) { int p1, p2; p1 = smbw_path(topath); p2 = smbw_path(frompath); if (p1 || p2) { /* can't handle symlinks */ errno = EPERM; return -1; } return real_symlink(topath, frompath); }