diff options
Diffstat (limited to 'source3/client')
-rw-r--r-- | source3/client/client.c | 10 | ||||
-rw-r--r-- | source3/client/smbspool.c | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index d22f1245fa..61c4c8e4be 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1379,7 +1379,7 @@ static int cmd_select(void) static int file_find(struct file_list **list, const char *directory, const char *expression, BOOL match) { - DIR *dir; + SMB_STRUCT_DIR *dir; struct file_list *entry; struct stat statbuf; int ret; @@ -1387,7 +1387,7 @@ static int file_find(struct file_list **list, const char *directory, BOOL isdir; const char *dname; - dir = opendir(directory); + dir = sys_opendir(directory); if (!dir) return -1; @@ -1416,14 +1416,14 @@ static int file_find(struct file_list **list, const char *directory, if (ret == -1) { SAFE_FREE(path); - closedir(dir); + sys_closedir(dir); return -1; } } entry = SMB_MALLOC_P(struct file_list); if (!entry) { d_printf("Out of memory in file_find\n"); - closedir(dir); + sys_closedir(dir); return -1; } entry->file_path = path; @@ -1434,7 +1434,7 @@ static int file_find(struct file_list **list, const char *directory, } } - closedir(dir); + sys_closedir(dir); return 0; } diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c index 16b071af19..b1c17a26fc 100644 --- a/source3/client/smbspool.c +++ b/source3/client/smbspool.c @@ -288,7 +288,7 @@ list_devices(void) static char * get_ticket_cache( uid_t uid ) { - DIR *tcdir; /* directory where ticket caches are stored */ + SMB_STRUCT_DIR *tcdir; /* directory where ticket caches are stored */ SMB_STRUCT_DIRENT *dirent; /* directory entry */ char *filename = NULL; /* holds file names on the tmp directory */ SMB_STRUCT_STAT buf; @@ -298,7 +298,7 @@ char * get_ticket_cache( uid_t uid ) time_t t = 0; snprintf(user_cache_prefix, CC_MAX_FILE_LEN, "%s%d", CC_PREFIX, uid ); - tcdir = opendir( TICKET_CC_DIR ); + tcdir = sys_opendir( TICKET_CC_DIR ); if ( tcdir == NULL ) return NULL; @@ -331,6 +331,8 @@ char * get_ticket_cache( uid_t uid ) } } + sys_closedir(tcdir); + if ( ticket_file == NULL ) { /* no ticket cache found */ |