Ignore:
Timestamp:
Jan 10, 2011, 1:45:04 PM (15 years ago)
Author:
Silvan Scherrer
Message:

Samba Client 2.1: sigpipe crash, cosmetic and text

File:
1 edited

Legend:

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

    r505 r516  
    195195        }
    196196*/
     197        /*
     198         * Block SIGPIPE (from lib/util_sock.c: write())
     199         * It is not needed and should not stop execution
     200         */
     201        BlockSignals(True, SIGPIPE);
     202
    197203        return 0;
    198204
     
    597603        if (!cli || !file || !*file->fname)
    598604        {
    599                 return EINVAL;
     605                return maperror(EINVAL);
    600606        }
    601607        if (file->denymode < DENY_ALL || file->denymode > DENY_NONE)
     
    634640        if (!cli || !file || !buf || !result)
    635641        {
    636                 return EINVAL;
     642                return maperror(EINVAL);
    637643        }
    638644       
     
    660666        if (!cli || !file || !buf || !result)
    661667        {
    662                 return EINVAL;
     668                return maperror(EINVAL);
    663669        }
    664670       
     
    684690        if (!cli || !file)
    685691        {
    686                 return EINVAL;
     692                return maperror(EINVAL);
    687693        }
    688694
     
    755761        if (!cli || !file)
    756762        {
    757                 return EINVAL;
     763                return maperror(EINVAL);
    758764        }
    759765
     
    791797        if (!cli || !oldname || !newname)
    792798        {
    793                 return EINVAL;
     799                return maperror(EINVAL);
    794800        }
    795801
     
    812818        if (!cli || !finfo || !*finfo->fname)
    813819        {
    814                 return EINVAL;
     820                return maperror(EINVAL);
    815821        }
    816822
     
    831837        if (!cli || !fname)
    832838        {
    833                 return EINVAL;
     839                return maperror(EINVAL);
    834840        }
    835841#if 0
     
    862868        if (!cli || !file)
    863869        {
    864                 return EINVAL;
     870                return maperror(EINVAL);
    865871        }
    866872
     
    871877                if (offset < 0)
    872878                {
    873                         return EINVAL;
     879                        return maperror(EINVAL);
    874880                }
    875881                file->offset = offset;
     
    881887                if (offset > 0)
    882888                {
    883                         return EINVAL;
     889                        return maperror(EINVAL);
    884890                }
    885891                if (!cli_qfileinfo3(cli, file->fd,
     
    893899                file->offset = size + offset;
    894900                break;
    895         default: return EINVAL;
     901        default: return maperror(EINVAL);
    896902        }
    897903
     
    908914        if (!cli || !finfo || !*finfo->fname)
    909915        {
    910                 return EINVAL;
     916                return maperror(EINVAL);
    911917        }
    912918        debuglocal(4,"getattr %d %d <%s>\n", cli->capabilities & CAP_NOPATHINFO2, cli->capabilities & CAP_NT_SMBS, finfo->fname);
     
    954960                if (rc == EINVAL)
    955961                {
    956                         rc = ENOTDIR;
     962                        rc = maperror(ENOTDIR);
    957963                }
    958964                return rc;
     
    980986        if (!cli || !file || !finfo)
    981987        {
    982                 return EINVAL;
     988                return maperror(EINVAL);
    983989        }
    984990
     
    15581564        if (!srv || !cli || !state || !*state->mask)
    15591565        {
    1560                 return EINVAL;
     1566                return maperror(EINVAL);
    15611567        }
    15621568        debuglocal(1,"Filelist <%s> on master <%s> wgrp <%s> server <%s> share <%s> clidev <%s>\n", state->mask, srv->master, srv->workgroup, srv->server_name, srv->share_name, cli->dev);
     
    16281634        if (!cli || !fname)
    16291635        {
    1630                 return EINVAL;
     1636                return maperror(EINVAL);
    16311637        }
    16321638
     
    16381644
    16391645        if (!(finfo.attr & aDIR)) {
    1640                 return ENOTDIR;
     1646                return maperror(ENOTDIR);
    16411647        }
    16421648
     
    16521658        if (!cli || !fname)
    16531659        {
    1654                 return EINVAL;
     1660                return maperror(EINVAL);
    16551661        }
    16561662
     
    16691675        if (!cli || !fname)
    16701676        {
    1671                 return EINVAL;
     1677                return maperror(EINVAL);
    16721678        }
    16731679
     
    16861692        if (!cli || !fname || !name)
    16871693        {
    1688                 return EINVAL;
     1694                return maperror(EINVAL);
    16891695        }
    16901696        if (!cli_set_ea_path(cli, fname, name, value, size))
     
    17021708        if (!cli || !file || !name)
    17031709        {
    1704                 return EINVAL;
     1710                return maperror(EINVAL);
    17051711        }
    17061712        if (!cli_set_ea_fnum(cli, file->fd, name, value, size))
     
    18011807        if (!cli || !fname || !buffer)
    18021808        {
    1803                 return EINVAL;
     1809                return maperror(EINVAL);
    18041810        }
    18051811
     
    18151821        if (!cli || !file || !buffer)
    18161822        {
    1817                 return EINVAL;
     1823                return maperror(EINVAL);
    18181824        }
    18191825
     
    18311837        if (!cli || !pfsa)
    18321838        {
    1833                 return EINVAL;
     1839                return maperror(EINVAL);
    18341840        }
    18351841
Note: See TracChangeset for help on using the changeset viewer.