lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPkE-bWykonYBssXGphktM7jANY_nbtQi7EVc4uLwjm-fdM8Kg@mail.gmail.com>
Date:   Wed, 17 May 2017 16:59:46 +0200
From:   Sebastien Buisson <sbuisson.ddn@...il.com>
To:     Stephen Smalley <sds@...ho.nsa.gov>
Cc:     linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org, selinux@...ho.nsa.gov,
        serge@...lyn.com, james.l.morris@...cle.com,
        Eric Paris <eparis@...isplace.org>,
        Paul Moore <paul@...l-moore.com>,
        Sebastien Buisson <sbuisson@....com>
Subject: Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-16 22:40 GMT+02:00 Stephen Smalley <sds@...ho.nsa.gov>:
>> +     strcpy(*brief, policydb.policybrief);
>> +     /* *len is the length of the output string */
>> +     *len = policybrief_len - 1;
>
> Is there a particular reason to not just return policybrief_len here as
> well, for consistency in the interface?  How do you intend to use this
> value in the caller?

As called in the other patch to expose policy brief via selinuxfs
(sel_read_policybrief), the intent is to provide the caller with the
length of the string returned.
Or should I set *len to policy brief_len here, and just make the
caller aware that the returned length is in fact the length of the
buffer (i.e. including terminating NUL byte)?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ