summaryrefslogtreecommitdiff
path: root/examples/libsmbclient/smbwrapper/opendir_smbsh.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-02-03 15:06:48 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-02-09 01:58:24 +0100
commit4328f3ccf37d9a1baadbc55f658902e3b16ff125 (patch)
tree203f4238cd13e283b423ee97df6ce2714298fd7f /examples/libsmbclient/smbwrapper/opendir_smbsh.c
parentb93326b9689d0ad935eed35f7cf5201ad04ac1ff (diff)
downloadsamba-4328f3ccf37d9a1baadbc55f658902e3b16ff125.tar.gz
samba-4328f3ccf37d9a1baadbc55f658902e3b16ff125.tar.bz2
samba-4328f3ccf37d9a1baadbc55f658902e3b16ff125.zip
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 <abartlet@samba.org> Autobuild-Date: Thu Feb 9 01:58:24 CET 2012 on sn-devel-104
Diffstat (limited to 'examples/libsmbclient/smbwrapper/opendir_smbsh.c')
-rw-r--r--examples/libsmbclient/smbwrapper/opendir_smbsh.c47
1 files changed, 0 insertions, 47 deletions
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 <sys/types.h>
-#include <dirent.h>
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <libsmbclient.h>
-
-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);
-}