7 #include <libsmbclient.h>
8 #include "get_auth_data_fn.h"
11 int main(int argc
, char * argv
[])
21 smbc_init(get_auth_data_fn
, debug
);
25 fprintf(stdout
, "Path: ");
27 fgets(path
, sizeof(path
) - 1, stdin
);
28 if (strlen(path
) == 0)
33 p
= path
+ strlen(path
) - 1;
39 if ((fd
= smbc_open(path
, O_RDONLY
, 0)) < 0)
47 ret
= smbc_read(fd
, buffer
, sizeof(buffer
));
49 if (ret
> 0) fwrite(buffer
, 1, ret
, stdout
);