Ignore:
Timestamp:
Jan 24, 2011, 12:04:13 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba Client 2.1: more errno fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/client/src/smbwrp.c

    r521 r528  
    174174
    175175        if (!lp_load(get_dyn_CONFIGFILE(),true,false,false,true)) {
    176                 debuglocal(0,("The initial smb.conf is missing, please reinstall the plugin!"));
    177         }
    178 
     176                debuglocal(0,("The initial smb.conf is missing, defaults are used!\n"));
     177        }
    179178
    180179        load_interfaces();
     
    959958        if (cli->capabilities & CAP_NT_SMBS && !(cli->capabilities & CAP_NOPATHINFO2))
    960959        {
    961                 int rc = os2cli_errno(cli);
     960                int ret = cli_errno(cli);
    962961                // cli_qpathinfo* reports EINVAL when path of given file not exists
    963962                // thus there is no real situation when EINVAL should be returned to
    964963                // client at this point, we just replace it to ENOTDIR
    965                 if (rc == EINVAL)
    966                 {
    967                         rc = maperror(ENOTDIR);
    968                 }
    969                 return rc;
     964                if (ret == EINVAL)
     965                {
     966                        ret = ENOTDIR;
     967                }
     968                return maperror(ret);
    970969        }
    971970
     
    10311030        {
    10321031                filelist_state * st  = (filelist_state *)state;
    1033                 char fullname[ _MAX_PATH];
     1032                char fullname[ _MAX_PATH] = {0};
    10341033                debuglocal(8,"adding <%s> %d %d %d\n", finfo->fname, sizeof(st->finfo), st->datalen, sizeof(st->finfo.fname));
    10351034                memcpy(&st->finfo, finfo, sizeof(st->finfo));
     
    10991098****************************************************************************/
    11001099// YD from libsmb\clilist.c
    1101 // @todo who frees fname, as clistr_pull_talloc allocs it
    11021100static size_t _os2_interpret_long_filename(TALLOC_CTX *ctx, struct cli_state *cli,
    11031101                                   int level,const char *p, const char *pdata_end, smbwrp_fileinfo *finfo,
     
    12491247                        }
    12501248                        strncpy(finfo->fname, fname, sizeof(finfo->fname) -1);
     1249
    12511250                        /* To be robust in the face of unicode conversion failures
    12521251                           we need to copy the raw bytes of the last name seen here.
Note: See TracChangeset for help on using the changeset viewer.