source:
vendor/current/examples/libsmbclient/testchmod.c@
414
| Last change on this file since 414 was 414, checked in by , 16 years ago | |
|---|---|
| File size: 1.2 KB | |
| Line | |
|---|---|
| 1 | #include <stdio.h> |
| 2 | #include <unistd.h> |
| 3 | #include <string.h> |
| 4 | #include <time.h> |
| 5 | #include <libsmbclient.h> |
| 6 | #include "get_auth_data_fn.h" |
| 7 | |
| 8 | |
| 9 | int main(int argc, char * argv[]) |
| 10 | { |
| 11 | int ret; |
| 12 | int debug = 0; |
| 13 | int mode = 0666; |
| 14 | char buffer[16384]; |
| 15 | char * pSmbPath = NULL; |
| 16 | struct stat st; |
| 17 | |
| 18 | if (argc == 1) |
| 19 | { |
| 20 | pSmbPath = "smb://RANDOM/Public/small"; |
| 21 | } |
| 22 | else if (argc == 2) |
| 23 | { |
| 24 | pSmbPath = argv[1]; |
| 25 | } |
| 26 | else if (argc == 3) |
| 27 | { |
| 28 | pSmbPath = argv[1]; |
| 29 | mode = (int) strtol(argv[2], NULL, 8); |
