Loading source3/libsmb/clirap.c +14 −1 Original line number Diff line number Diff line Loading @@ -217,6 +217,8 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, int uLevel = 1; int count = -1; errno = 0; /* reset */ /* send a SMBtrans command with api NetServerEnum */ p = param; SSVAL(p,0,0x68); /* api number */ Loading Loading @@ -270,6 +272,17 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, SAFE_FREE(rparam); SAFE_FREE(rdata); if (count < 0) { errno = cli_errno(cli); } else { if (!count) { /* this is a very special case, when the domain master for the work group isn't part of the work group itself, there is something wild going on */ errno = ENOENT; } } return(count > 0); } Loading source3/libsmb/libsmbclient.c +1 −4 Original line number Diff line number Diff line Loading @@ -1939,7 +1939,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } errno = cli_errno(&srv->cli); return NULL; Loading Loading @@ -2032,7 +2031,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } errno = cli_errno(&srv->cli); return NULL; Loading Loading @@ -2106,7 +2104,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } errno = cli_errno(&srv->cli); return NULL; } Loading Loading @@ -2150,7 +2147,7 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) } else { errno = ENODEV; /* Neither the workgroup nor server exists */ errno = ECONNREFUSED; /* Neither the workgroup nor server exists */ if (dir) { SAFE_FREE(dir->fname); SAFE_FREE(dir); Loading Loading
source3/libsmb/clirap.c +14 −1 Original line number Diff line number Diff line Loading @@ -217,6 +217,8 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, int uLevel = 1; int count = -1; errno = 0; /* reset */ /* send a SMBtrans command with api NetServerEnum */ p = param; SSVAL(p,0,0x68); /* api number */ Loading Loading @@ -270,6 +272,17 @@ BOOL cli_NetServerEnum(struct cli_state *cli, char *workgroup, uint32 stype, SAFE_FREE(rparam); SAFE_FREE(rdata); if (count < 0) { errno = cli_errno(cli); } else { if (!count) { /* this is a very special case, when the domain master for the work group isn't part of the work group itself, there is something wild going on */ errno = ENOENT; } } return(count > 0); } Loading
source3/libsmb/libsmbclient.c +1 −4 Original line number Diff line number Diff line Loading @@ -1939,7 +1939,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } errno = cli_errno(&srv->cli); return NULL; Loading Loading @@ -2032,7 +2031,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } errno = cli_errno(&srv->cli); return NULL; Loading Loading @@ -2106,7 +2104,6 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) SAFE_FREE(dir->fname); SAFE_FREE(dir); } errno = cli_errno(&srv->cli); return NULL; } Loading Loading @@ -2150,7 +2147,7 @@ static SMBCFILE *smbc_opendir_ctx(SMBCCTX *context, const char *fname) } else { errno = ENODEV; /* Neither the workgroup nor server exists */ errno = ECONNREFUSED; /* Neither the workgroup nor server exists */ if (dir) { SAFE_FREE(dir->fname); SAFE_FREE(dir); Loading