On 3/15/18 4:11 PM, Martijn Dekker wrote:
> Op 14-03-18 om 16:49 schreef Martijn Dekker:
> [...]
>> {
>>digits++;
>>result = (result * 8) + (*string++ - '0');
>> - if (result > 0777)
>> + if (result > 0)
>> return -1;
>> }
>>
>> By the way, why does that
Op 14-03-18 om 16:49 schreef Martijn Dekker:
[...]
> {
>digits++;
>result = (result * 8) + (*string++ - '0');
> - if (result > 0777)
> + if (result > 0)
> return -1;
> }
>
> By the way, why does that function repeatedly check the bounds for every
> dig
On 3/14/18 11:49 AM, Martijn Dekker wrote:
> This fixes two bugs:
>
> 1. The example 'mkdir' builtin, examples/loadables/mkdir.c, has a broken
> '-m' option that doesn't accept sticky/setuid/setgid.
>
> $ ./bash -c '(cd examples/loadables && make mkdir) &&
> enable -f examples/loadables/mkd
Op 14-03-18 om 16:49 schreef Martijn Dekker:
> While POSIX says the effect of specifying sticky/setuid/setgid bits is
> unspecified[*], the 'umask' builtin should still accept these bits, as
> it does in every other shell.
Forgot the footnote link. Here it is:
http://pubs.opengroup.org/onlinepubs/
This fixes two bugs:
1. The example 'mkdir' builtin, examples/loadables/mkdir.c, has a broken
'-m' option that doesn't accept sticky/setuid/setgid.
$ ./bash -c '(cd examples/loadables && make mkdir) &&
enable -f examples/loadables/mkdir mkdir &&
mkdir -m2775 foo'
['make' output sk