From 49177b07c831bd463752e6489c29e9dc0e680301 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Thu, 17 May 2001 02:29:00 +0000 Subject: Adding an examples directory for libsmbclient to the head branch along with a simple Makefile and a small README ... (This used to be commit 950821d69cb6dcc723f8610584718c6217136d55) --- examples/libsmbclient/testsmbc.c | 456 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 456 insertions(+) create mode 100644 examples/libsmbclient/testsmbc.c (limited to 'examples/libsmbclient/testsmbc.c') diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c new file mode 100644 index 0000000000..7aae9d8561 --- /dev/null +++ b/examples/libsmbclient/testsmbc.c @@ -0,0 +1,456 @@ +/* + Unix SMB/Netbios implementation. + Version 2.0 + SMB client library test program + Copyright (C) Andrew Tridgell 1998 + Copyright (C) Richard Sharpe 2000 + Copyright (C) John Terpsra 2000 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include + +void auth_fn(const char *server, const char *share, + char *workgroup, int wgmaxlen, char *username, int unmaxlen, + char *password, int pwmaxlen) +{ + char temp[128]; + + fprintf(stdout, "Need password for //%s/%s\n", server, share); + + fprintf(stdout, "Enter workgroup: [%s] ", workgroup); + fgets(temp, sizeof(temp), stdin); + + if (temp[strlen(temp) - 1] == 0x0a) /* A new line? */ + temp[strlen(temp) - 1] = 0x00; + + if (temp[0]) strncpy(workgroup, temp, wgmaxlen - 1); + + fprintf(stdout, "Enter username: [%s] ", username); + fgets(temp, sizeof(temp), stdin); + + if (temp[strlen(temp) - 1] == 0x0a) /* A new line? */ + temp[strlen(temp) - 1] = 0x00; + + if (temp[0]) strncpy(username, temp, unmaxlen - 1); + + fprintf(stdout, "Enter password: [%s] ", password); + fgets(temp, sizeof(temp), stdin); + + if (temp[strlen(temp) - 1] == 0x0a) /* A new line? */ + temp[strlen(temp) - 1] = 0x00; + + if (temp[0]) strncpy(password, temp, pwmaxlen - 1); + +} + +int global_id = 0; + +void print_list_fn(struct print_job_info *pji) +{ + + fprintf(stdout, "Print job: ID: %u, Prio: %u, Size: %u, User: %s, Name: %s\n", + pji->id, pji->priority, pji->size, pji->user, pji->name); + + global_id = pji->id; + +} + +int main(int argc, char *argv[]) +{ + int err, fd, dh1, dh2, dh3, dsize, dirc; + const char *file = "smb://samba/public/testfile.txt"; + const char *file2 = "smb://samba/public/testfile2.txt"; + char buff[256]; + char dirbuf[512]; + char *dirp; + struct stat st1, st2; + + err = smbc_init(auth_fn, 10); /* Initialize things */ + + if (err < 0) { + + fprintf(stderr, "Initializing the smbclient library ...: %s\n", strerror(errno)); + + } + + if (argc > 1) { + + /* Try to list the print jobs ... */ + + if (smbc_list_print_jobs("smb://samba/pclp", print_list_fn) < 0) { + + fprintf(stderr, "Could not list print jobs: %s, %d\n", strerror(errno), errno); + exit(1); + + } + + /* Try to delete the last job listed */ + + if (global_id > 0) { + + fprintf(stdout, "Trying to delete print job %u\n", global_id); + + if (smbc_unlink_print_job("smb://samba/pclp", global_id) < 0) { + + fprintf(stderr, "Failed to unlink job id %u, %s, %u\n", global_id, + strerror(errno), errno); + + exit(1); + + } + + } + + /* Try to print a file ... */ + + if (smbc_print_file("smb://samba/public/testfile2.txt", "smb://samba/pclp") < 0) { + + fprintf(stderr, "Failed to print job: %s %u\n", strerror(errno), errno); + exit(1); + + } + + /* Try to delete argv[1] as a file ... */ + + if (smbc_unlink(argv[1]) < 0) { + + fprintf(stderr, "Could not unlink: %s, %s, %d\n", + argv[1], strerror(errno), errno); + + exit(0); + + } + + if ((dh1 = smbc_opendir("smb://"))<1) { + + fprintf(stderr, "Could not open directory: smb://: %s\n", + strerror(errno)); + + exit(1); + + } + + if ((dh2 = smbc_opendir("smb://sambanet")) < 0) { + + fprintf(stderr, "Could not open directory: smb://sambanet: %s\n", + strerror(errno)); + + exit(1); + + } + + if ((dh3 = smbc_opendir("smb://samba")) < 0) { + + fprintf(stderr, "Could not open directory: smb://samba: %s\n", + strerror(errno)); + + exit(1); + + } + + fprintf(stdout, "Directory handles: %u, %u, %u\n", dh1, dh2, dh3); + + /* Now, list those directories, but in funny ways ... */ + + dirp = (char *)dirbuf; + + if ((dirc = smbc_getdents(dh1, (struct smbc_dirent *)dirp, + sizeof(dirbuf))) < 0) { + + fprintf(stderr, "Problems getting directory entries: %s\n", + strerror(errno)); + + exit(1); + + } + + /* Now, process the list of names ... */ + + fprintf(stdout, "Directory listing, size = %u\n", dirc); + + while (dirc > 0) { + + dsize = ((struct smbc_dirent *)dirp)->dirlen; + fprintf(stdout, "Dir Ent, Type: %u, Name: %s, Comment: %s\n", + ((struct smbc_dirent *)dirp)->smbc_type, + ((struct smbc_dirent *)dirp)->name, + ((struct smbc_dirent *)dirp)->comment); + + dirp += dsize; + (char *)dirc -= dsize; + + } + + dirp = (char *)dirbuf; + + if ((dirc = smbc_getdents(dh2, (struct smbc_dirent *)dirp, + sizeof(dirbuf))) < 0) { + + fprintf(stderr, "Problems getting directory entries: %s\n", + strerror(errno)); + + exit(1); + + } + + /* Now, process the list of names ... */ + + fprintf(stdout, "\nDirectory listing, size = %u\n", dirc); + + while (dirc > 0) { + + dsize = ((struct smbc_dirent *)dirp)->dirlen; + fprintf(stdout, "Dir Ent, Type: %u, Name: %s, Comment: %s\n", + ((struct smbc_dirent *)dirp)->smbc_type, + ((struct smbc_dirent *)dirp)->name, + ((struct smbc_dirent *)dirp)->comment); + + dirp += dsize; + (char *)dirc -= dsize; + + } + + dirp = (char *)dirbuf; + + if ((dirc = smbc_getdents(dh3, (struct smbc_dirent *)dirp, + sizeof(dirbuf))) < 0) { + + fprintf(stderr, "Problems getting directory entries: %s\n", + strerror(errno)); + + exit(1); + + } + + /* Now, process the list of names ... */ + + fprintf(stdout, "Directory listing, size = %u\n", dirc); + + while (dirc > 0) { + + dsize = ((struct smbc_dirent *)dirp)->dirlen; + fprintf(stdout, "\nDir Ent, Type: %u, Name: %s, Comment: %s\n", + ((struct smbc_dirent *)dirp)->smbc_type, + ((struct smbc_dirent *)dirp)->name, + ((struct smbc_dirent *)dirp)->comment); + + (char *)dirp += dsize; + (char *)dirc -= dsize; + + } + + exit(1); + + } + + /* For now, open a file on a server that is hard coded ... later will + * read from the command line ... + */ + + fd = smbc_open(file, O_RDWR | O_CREAT | O_TRUNC, 0666); + + if (fd < 0) { + + fprintf(stderr, "Creating file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + fprintf(stdout, "Opened or created file: %s\n", file); + + /* Now, write some date to the file ... */ + + bzero(buff, sizeof(buff)); + strcpy(buff, "Some test data for the moment ..."); + + err = smbc_write(fd, buff, sizeof(buff)); + + if (err < 0) { + + fprintf(stderr, "writing file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + fprintf(stdout, "Wrote %d bytes to file: %s\n", sizeof(buff), buff); + + /* Now, seek the file back to offset 0 */ + + err = smbc_lseek(fd, SEEK_SET, 0); + + if (err < 0) { + + fprintf(stderr, "Seeking file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + fprintf(stdout, "Completed lseek on file: %s\n", file); + + /* Now, read the file contents back ... */ + + err = smbc_read(fd, buff, sizeof(buff)); + + if (err < 0) { + + fprintf(stderr, "Reading file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + fprintf(stdout, "Read file: %s\n", buff); /* Should check the contents */ + + fprintf(stdout, "Now fstat'ing file: %s\n", file); + + err = smbc_fstat(fd, &st1); + + if (err < 0) { + + fprintf(stderr, "Fstat'ing file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + + /* Now, close the file ... */ + + err = smbc_close(fd); + + if (err < 0) { + + fprintf(stderr, "Closing file: %s: %s\n", file, strerror(errno)); + + } + + /* Now, rename the file ... */ + + err = smbc_rename(file, file2); + + if (err < 0) { + + fprintf(stderr, "Renaming file: %s to %s: %s\n", file, file2, strerror(errno)); + + } + + fprintf(stdout, "Renamed file %s to %s\n", file, file2); + + /* Now, create a file and delete it ... */ + + fprintf(stdout, "Now, creating file: %s so we can delete it.\n", file); + + fd = smbc_open(file, O_RDWR | O_CREAT, 0666); + + if (fd < 0) { + + fprintf(stderr, "Creating file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + fprintf(stdout, "Opened or created file: %s\n", file); + + err = smbc_close(fd); + + if (err < 0) { + + fprintf(stderr, "Closing file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + /* Now, delete the file ... */ + + fprintf(stdout, "File %s created, now deleting ...\n", file); + + err = smbc_unlink(file); + + if (err < 0) { + + fprintf(stderr, "Deleting file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + /* Now, stat the file, file 2 ... */ + + fprintf(stdout, "Now stat'ing file: %s\n", file); + + err = smbc_stat(file2, &st2); + + if (err < 0) { + + fprintf(stderr, "Stat'ing file: %s: %s\n", file, strerror(errno)); + exit(0); + + } + + fprintf(stdout, "Stat'ed file: %s. Size = %d, mode = %04X\n", file2, + (int)st2.st_size, st2.st_mode); + fprintf(stdout, " time: %s\n", ctime(&st2.st_atime)); + fprintf(stdout, "Earlier stat: %s, Size = %d, mode = %04X\n", file, + (int)st1.st_size, st1.st_mode); + fprintf(stdout, " time: %s\n", ctime(&st1.st_atime)); + + /* Now, make a directory ... */ + + fprintf(stdout, "Making directory smb://samba/public/make-dir\n"); + + if (smbc_mkdir("smb://samba/public/make-dir", 0666) < 0) { + + fprintf(stderr, "Error making directory: smb://samba/public/make-dir: %s\n", + strerror(errno)); + + if (errno == EEXIST) { /* Try to delete the directory */ + + fprintf(stdout, "Trying to delete directory: smb://samba/public/make-dir\n"); + + if (smbc_rmdir("smb://samba/public/make-dir") < 0) { /* Error */ + + fprintf(stderr, "Error removing directory: smb://samba/public/make-dir: %s\n", strerror(errno)); + + exit(0); + + } + + fprintf(stdout, "Making directory: smb://samba/public/make-dir\n"); + + if (smbc_mkdir("smb://samba/public/make-dir", 666) < 0) { + + fprintf(stderr, "Error making directory: smb://samba/public/make-dir: %s\n", + strerror(errno)); + + fprintf(stderr, "I give up!\n"); + + exit(1); + + } + + } + + exit(0); + + } + + fprintf(stdout, "Made dir: make-dir\n"); + return 0; +} -- cgit From 3bff6c4f981eb97f14117f350be00ff1cdfa26a9 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 22 Jan 2003 23:50:14 +0000 Subject: Sync with HEAD. (This used to be commit db3901827fe776041fa38900e80ab2fab94c28a6) --- examples/libsmbclient/testsmbc.c | 129 ++------------------------------------- 1 file changed, 4 insertions(+), 125 deletions(-) (limited to 'examples/libsmbclient/testsmbc.c') diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c index 7aae9d8561..888a9c0d4f 100644 --- a/examples/libsmbclient/testsmbc.c +++ b/examples/libsmbclient/testsmbc.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 2.0 + Unix SMB/CIFS implementation. SMB client library test program Copyright (C) Andrew Tridgell 1998 Copyright (C) Richard Sharpe 2000 @@ -95,74 +94,10 @@ int main(int argc, char *argv[]) if (argc > 1) { - /* Try to list the print jobs ... */ + if ((dh1 = smbc_opendir(argv[1]))<1) { - if (smbc_list_print_jobs("smb://samba/pclp", print_list_fn) < 0) { - - fprintf(stderr, "Could not list print jobs: %s, %d\n", strerror(errno), errno); - exit(1); - - } - - /* Try to delete the last job listed */ - - if (global_id > 0) { - - fprintf(stdout, "Trying to delete print job %u\n", global_id); - - if (smbc_unlink_print_job("smb://samba/pclp", global_id) < 0) { - - fprintf(stderr, "Failed to unlink job id %u, %s, %u\n", global_id, - strerror(errno), errno); - - exit(1); - - } - - } - - /* Try to print a file ... */ - - if (smbc_print_file("smb://samba/public/testfile2.txt", "smb://samba/pclp") < 0) { - - fprintf(stderr, "Failed to print job: %s %u\n", strerror(errno), errno); - exit(1); - - } - - /* Try to delete argv[1] as a file ... */ - - if (smbc_unlink(argv[1]) < 0) { - - fprintf(stderr, "Could not unlink: %s, %s, %d\n", - argv[1], strerror(errno), errno); - - exit(0); - - } - - if ((dh1 = smbc_opendir("smb://"))<1) { - - fprintf(stderr, "Could not open directory: smb://: %s\n", - strerror(errno)); - - exit(1); - - } - - if ((dh2 = smbc_opendir("smb://sambanet")) < 0) { - - fprintf(stderr, "Could not open directory: smb://sambanet: %s\n", - strerror(errno)); - - exit(1); - - } - - if ((dh3 = smbc_opendir("smb://samba")) < 0) { - - fprintf(stderr, "Could not open directory: smb://samba: %s\n", - strerror(errno)); + fprintf(stderr, "Could not open directory: %s: %s\n", + argv[1], strerror(errno)); exit(1); @@ -203,62 +138,6 @@ int main(int argc, char *argv[]) dirp = (char *)dirbuf; - if ((dirc = smbc_getdents(dh2, (struct smbc_dirent *)dirp, - sizeof(dirbuf))) < 0) { - - fprintf(stderr, "Problems getting directory entries: %s\n", - strerror(errno)); - - exit(1); - - } - - /* Now, process the list of names ... */ - - fprintf(stdout, "\nDirectory listing, size = %u\n", dirc); - - while (dirc > 0) { - - dsize = ((struct smbc_dirent *)dirp)->dirlen; - fprintf(stdout, "Dir Ent, Type: %u, Name: %s, Comment: %s\n", - ((struct smbc_dirent *)dirp)->smbc_type, - ((struct smbc_dirent *)dirp)->name, - ((struct smbc_dirent *)dirp)->comment); - - dirp += dsize; - (char *)dirc -= dsize; - - } - - dirp = (char *)dirbuf; - - if ((dirc = smbc_getdents(dh3, (struct smbc_dirent *)dirp, - sizeof(dirbuf))) < 0) { - - fprintf(stderr, "Problems getting directory entries: %s\n", - strerror(errno)); - - exit(1); - - } - - /* Now, process the list of names ... */ - - fprintf(stdout, "Directory listing, size = %u\n", dirc); - - while (dirc > 0) { - - dsize = ((struct smbc_dirent *)dirp)->dirlen; - fprintf(stdout, "\nDir Ent, Type: %u, Name: %s, Comment: %s\n", - ((struct smbc_dirent *)dirp)->smbc_type, - ((struct smbc_dirent *)dirp)->name, - ((struct smbc_dirent *)dirp)->comment); - - (char *)dirp += dsize; - (char *)dirc -= dsize; - - } - exit(1); } -- cgit From fbc611f431db443c23486f768ca5e2bc4db95c24 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Tue, 29 Mar 2005 00:42:51 +0000 Subject: r6108: Added smbsh/smbwrapper for Linux to example/libsmbclient tree; provided more complete libsmbclient testbrowse utility (This used to be commit 15736b97c837a16d9c009b8bff18b31429ccbe83) --- examples/libsmbclient/testsmbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/libsmbclient/testsmbc.c') diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c index 888a9c0d4f..9f5e6148ee 100644 --- a/examples/libsmbclient/testsmbc.c +++ b/examples/libsmbclient/testsmbc.c @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) ((struct smbc_dirent *)dirp)->comment); dirp += dsize; - (char *)dirc -= dsize; + dirc -= dsize; } -- cgit From 9840db418bad5a39edc4a32a1786f5e2d2c9dff8 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Thu, 31 Mar 2005 05:06:04 +0000 Subject: r6149: Fixes bugs #2498 and 2484. 1. using smbc_getxattr() et al, one may now request all access control entities in the ACL without getting all other NT attributes. 2. added the ability to exclude specified attributes from the result set provided by smbc_getxattr() et al, when requesting all attributes, all NT attributes, or all DOS attributes. 3. eliminated all compiler warnings, including when --enable-developer compiler flags are in use. removed -Wcast-qual flag from list, as that is specifically to force warnings in the case of casting away qualifiers. Note: In the process of eliminating compiler warnings, a few nasties were discovered. In the file libads/sasl.c, PRIVATE kerberos interfaces are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED kerberos interfaces are being used. Someone who knows kerberos should look at these and determine if there is an alternate method of accomplishing the task. (This used to be commit 994694f7f26da5099f071e1381271a70407f33bb) --- examples/libsmbclient/testsmbc.c | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'examples/libsmbclient/testsmbc.c') diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c index 9f5e6148ee..45e67bee62 100644 --- a/examples/libsmbclient/testsmbc.c +++ b/examples/libsmbclient/testsmbc.c @@ -27,40 +27,7 @@ #include #include #include - -void auth_fn(const char *server, const char *share, - char *workgroup, int wgmaxlen, char *username, int unmaxlen, - char *password, int pwmaxlen) -{ - char temp[128]; - - fprintf(stdout, "Need password for //%s/%s\n", server, share); - - fprintf(stdout, "Enter workgroup: [%s] ", workgroup); - fgets(temp, sizeof(temp), stdin); - - if (temp[strlen(temp) - 1] == 0x0a) /* A new line? */ - temp[strlen(temp) - 1] = 0x00; - - if (temp[0]) strncpy(workgroup, temp, wgmaxlen - 1); - - fprintf(stdout, "Enter username: [%s] ", username); - fgets(temp, sizeof(temp), stdin); - - if (temp[strlen(temp) - 1] == 0x0a) /* A new line? */ - temp[strlen(temp) - 1] = 0x00; - - if (temp[0]) strncpy(username, temp, unmaxlen - 1); - - fprintf(stdout, "Enter password: [%s] ", password); - fgets(temp, sizeof(temp), stdin); - - if (temp[strlen(temp) - 1] == 0x0a) /* A new line? */ - temp[strlen(temp) - 1] = 0x00; - - if (temp[0]) strncpy(password, temp, pwmaxlen - 1); - -} +#include "get_auth_data_fn.h" int global_id = 0; @@ -84,7 +51,7 @@ int main(int argc, char *argv[]) char *dirp; struct stat st1, st2; - err = smbc_init(auth_fn, 10); /* Initialize things */ + err = smbc_init(get_auth_data_fn, 10); /* Initialize things */ if (err < 0) { -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- examples/libsmbclient/testsmbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/libsmbclient/testsmbc.c') diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c index 45e67bee62..eee31a378c 100644 --- a/examples/libsmbclient/testsmbc.c +++ b/examples/libsmbclient/testsmbc.c @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -- cgit From 58e9534300430fa4f2bcb50fb2d1d2990bdbe636 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 00:57:11 +0000 Subject: r23785: use the GPLv3 boilerplate as recommended by the FSF and the license text (This used to be commit d0e89d246d8e5e64196d6c1d16d39a70579ca42f) --- examples/libsmbclient/testsmbc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/libsmbclient/testsmbc.c') diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c index eee31a378c..c506f5fd64 100644 --- a/examples/libsmbclient/testsmbc.c +++ b/examples/libsmbclient/testsmbc.c @@ -16,8 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include -- cgit From 1363ee9d65965704f716965c6cbcfc0693ca2401 Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Mon, 3 Mar 2008 18:13:33 -0500 Subject: Continued revamping of libsmbclient. - James suggested using gcc's "deprecated" attribute to mark the context structure fields to generate warnings. This creates a scenario with the best of all worlds. I'm able to move to an organization that more easily allows future enhancements, while avoiding any mandatory changes by applications. Thanks, James! - Updated WHATSNEW.txt so that it accurately reflects the current state of affairs. Derrell (This used to be commit a67f96fbe9683b46c2149f7cb439d13f7f0e6ecd) --- examples/libsmbclient/testsmbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/libsmbclient/testsmbc.c') diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c index c506f5fd64..1f06437293 100644 --- a/examples/libsmbclient/testsmbc.c +++ b/examples/libsmbclient/testsmbc.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include "libsmbclient.h" #include "get_auth_data_fn.h" int global_id = 0; -- cgit