The variable forkRest is not used after commit 25f8781
https://github.com/libvirt/libvirt/commit/25f8781#diff-d2023c1ac4f688aa2021e21cfb60d4f0L1861
Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
---
src/util/virfile.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 523241f64f..a2c4cebb56 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode,
{
pid_t pid = 0;
int status, ret = 0;
- int forkRet = 0;
gid_t *groups;
int ngroups;
@@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode,
return 0;
}
- /* child.
- * Return positive value here. Parent
- * will change it to negative one. */
-
- if (forkRet < 0) {
- ret = errno;
- goto childerror;
- }
-
if (virSetUIDGID(uid, gid, groups, ngroups) < 0) {
ret = errno;
goto childerror;
--
2.17.1
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Tue, Jun 05, 2018 at 07:32:57AM +0100, Radostin Stoyanov wrote:
>The variable forkRest is not used after commit 25f8781
>
forkRet
>https://github.com/libvirt/libvirt/commit/25f8781#diff-d2023c1ac4f688aa2021e21cfb60d4f0L1861
>
The libvirt git repo is hosted at:
https://libvirt.org/git/?p=libvirt.git;a=summary
Please refrain from linking mirrors.
>Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
>---
> src/util/virfile.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
>diff --git a/src/util/virfile.c b/src/util/virfile.c
>index 523241f64f..a2c4cebb56 100644
>--- a/src/util/virfile.c
>+++ b/src/util/virfile.c
>@@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode,
> {
> pid_t pid = 0;
> int status, ret = 0;
>- int forkRet = 0;
> gid_t *groups;
> int ngroups;
>
>@@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode,
> return 0;
> }
>
>- /* child.
>- * Return positive value here. Parent
>- * will change it to negative one. */
>-
>- if (forkRet < 0) {
>- ret = errno;
>- goto childerror;
>- }
>-
Hmm, even before the changes in commit 25f87817 I don't see how forkRet
could have been less than 0 here.
Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On 05/06/18 07:50, Ján Tomko wrote:
> On Tue, Jun 05, 2018 at 07:32:57AM +0100, Radostin Stoyanov wrote:
>> The variable forkRest is not used after commit 25f8781
>>
>
> forkRet
>
>> https://github.com/libvirt/libvirt/commit/25f8781#diff-d2023c1ac4f688aa2021e21cfb60d4f0L1861
>>
>>
>
> The libvirt git repo is hosted at:
> https://libvirt.org/git/?p=libvirt.git;a=summary
> Please refrain from linking mirrors.
>
Thank you for the feedback!
I resent the patch.
>> Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
>> ---
>> src/util/virfile.c | 10 ----------
>> 1 file changed, 10 deletions(-)
>>
>> diff --git a/src/util/virfile.c b/src/util/virfile.c
>> index 523241f64f..a2c4cebb56 100644
>> --- a/src/util/virfile.c
>> +++ b/src/util/virfile.c
>> @@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode,
>> {
>> pid_t pid = 0;
>> int status, ret = 0;
>> - int forkRet = 0;
>> gid_t *groups;
>> int ngroups;
>>
>> @@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode,
>> return 0;
>> }
>>
>> - /* child.
>> - * Return positive value here. Parent
>> - * will change it to negative one. */
>> -
>> - if (forkRet < 0) {
>> - ret = errno;
>> - goto childerror;
>> - }
>> -
>
> Hmm, even before the changes in commit 25f87817 I don't see how forkRet
> could have been less than 0 here.
>
> Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
I will resend this patch with more appropriate title.
On 05/06/18 07:32, Radostin Stoyanov wrote:
> The variable forkRest is not used after commit 25f8781
>
> https://github.com/libvirt/libvirt/commit/25f8781#diff-d2023c1ac4f688aa2021e21cfb60d4f0L1861
>
> Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
> ---
> src/util/virfile.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/src/util/virfile.c b/src/util/virfile.c
> index 523241f64f..a2c4cebb56 100644
> --- a/src/util/virfile.c
> +++ b/src/util/virfile.c
> @@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode,
> {
> pid_t pid = 0;
> int status, ret = 0;
> - int forkRet = 0;
> gid_t *groups;
> int ngroups;
>
> @@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode,
> return 0;
> }
>
> - /* child.
> - * Return positive value here. Parent
> - * will change it to negative one. */
> -
> - if (forkRet < 0) {
> - ret = errno;
> - goto childerror;
> - }
> -
> if (virSetUIDGID(uid, gid, groups, ngroups) < 0) {
> ret = errno;
> goto childerror;
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2025 Red Hat, Inc.