FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Build System

 
 
LinkBack Thread Tools
 
Old 01-17-2012, 11:25 AM
Kirby Zhou
 
Default Is it a bug of mock?

*

/usr/lib/python2.6/site-packages/mockbuild/uid.py

mock-1.1.18-1.el6.noarch

*

ccache plugin calls changeOwner to take the ownership of ccache directory,


but why set gid to uid?

*

70**** decorate(traceLog())

71**** def changeOwner(self, path, uid=None, gid=None):

72******** self._elevatePrivs()

73******** if uid is None:

74************ uid = self.unprivUid

75******** if gid is None:

76************ gid = uid

77******** os.chown(path, uid, gid)

*

Regards

Kirby Zhou

+86 (10) 6272 8261

*




--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 
Old 01-17-2012, 02:56 PM
Clark Williams
 
Default Is it a bug of mock?

On Tue, 17 Jan 2012 12:25:28 +0000
Kirby Zhou <kirbyzhou@sogou-inc.com> wrote:

>
> /usr/lib/python2.6/site-packages/mockbuild/uid.py
> mock-1.1.18-1.el6.noarch
>
> ccache plugin calls changeOwner to take the ownership of ccache directory,
> but why set gid to uid?
>
> 70 decorate(traceLog())
> 71 def changeOwner(self, path, uid=None, gid=None):
> 72 self._elevatePrivs()
> 73 if uid is None:
> 74 uid = self.unprivUid
> 75 if gid is None:
> 76 gid = uid
> 77 os.chown(path, uid, gid)
>
> Regards
> Kirby Zhou
> +86 (10) 6272 8261
>

Kirby,

I'm not sure why the gid was set to the uid (I'm not the original
author of the uid.py code).

Seems more logical to set it to -1 so that it will be unchanged...

Clark
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys
 

Thread Tools




All times are GMT. The time now is 10:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org