Re: [PATCH] C version of git-count-objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +                       if (access(subdir, R_OK | X_OK))
> +                               continue;
> +                       chdir(subdir);

You've got yourself a needless race condition right there.  Just
do the chdir and check the return value.  (And besides, access
checks with the wrong set of permissions, should this ever end
up in set[ug]id context.)

Morten
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]