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 p
= fgets(path
, sizeof(path
) - 1, stdin
);
29 fprintf(stderr
, "failed to read from stdin\n");
32 if (strlen(path
) == 0)
37 p
= path
+ strlen(path
) - 1;
43 if ((fd
= smbc_open(path
, O_RDONLY
, 0)) < 0)
51 ret
= smbc_read(fd
, buffer
, sizeof(buffer
));
53 if (ret
> 0) fwrite(buffer
, 1, ret
, stdout
);