From 4328f3ccf37d9a1baadbc55f658902e3b16ff125 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 3 Feb 2012 15:06:48 +1100 Subject: smbwrapper: Remove smbwrapper There are now many better ways to access a remote SMB filesystem, which do not rely on LD_PRELOAD and the associated dangers. FUSE, gvfs and the CIFS VFS are all much better options which do not require knowing every possible libc entry point that can deal with a file descriptor. As an example of the maintainence that would be required to keep this going, recent changes to deal with thread races and close-on-exec have resulted in dup3(), but this isn't currently mapped. While this would not be hard to add, it illistrates why it is better to move to an interface designed for this task. Andrew Bartlett Autobuild-User: Andrew Bartlett Autobuild-Date: Thu Feb 9 01:58:24 CET 2012 on sn-devel-104 --- examples/libsmbclient/smbwrapper/opendir_smbsh.c | 47 ------------------------ 1 file changed, 47 deletions(-) delete mode 100644 examples/libsmbclient/smbwrapper/opendir_smbsh.c (limited to 'examples/libsmbclient/smbwrapper/opendir_smbsh.c') diff --git a/examples/libsmbclient/smbwrapper/opendir_smbsh.c b/examples/libsmbclient/smbwrapper/opendir_smbsh.c deleted file mode 100644 index 275b95f8ea..0000000000 --- a/examples/libsmbclient/smbwrapper/opendir_smbsh.c +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include -#include -#include -#include -#include - -int -main(int argc, char * argv[]) -{ - char * p; - char buf[1024]; - DIR * dir; - struct dirent * dirent; - - setbuf(stdout, NULL); - - for (fputs("path: ", stdout), p = fgets(buf, sizeof(buf), stdin); - p != NULL && *p != '\n' && *p != '\0'; - fputs("path: ", stdout), p = fgets(buf, sizeof(buf), stdin)) - { - if ((p = strchr(buf, '\n')) != NULL) - { - *p = '\0'; - } - - printf("Opening (%s)...\n", buf); - - if ((dir = opendir(buf)) == NULL) - { - printf("Could not open directory [%s]: \n", - buf, strerror(errno)); - continue; - } - - while ((dirent = readdir(dir)) != NULL) - { - printf("%-30s", dirent->d_name); - printf("%-30s", dirent->d_name + strlen(dirent->d_name) + 1); - printf("\n"); - } - - closedir(dir); - } - - exit(0); -} -- cgit