Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 878647 - app-eselect/eselect-repository remove doesn't refrain from attempting to run as user
Summary: app-eselect/eselect-repository remove doesn't refrain from attempting to run ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-29 12:13 UTC by CaptainBlood
Modified: 2022-10-29 15:33 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CaptainBlood 2022-10-29 12:13:04 UTC
As an example snippet:
eselect repository remove argent-main
eselect repository remove argent-main
--2022-10-29 15:03:40--  https://qa-reports.gentoo.org/output/repos/repositories.xml
Resolving qa-reports.gentoo.org... 151.101.2.137, 151.101.66.137, 151.101.130.137, ...
Connecting to qa-reports.gentoo.org|151.101.2.137|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 259443 (253K) [text/xml]
Saving to: '/home/luc/.cache/eselect-repo/repositories.xml'

repositories.xml                         100%[=================================================================================>] 253.36K   485KB/s    in 0.5s    

2022-10-29 15:03:43 (485 KB/s) - '/home/luc/.cache/eselect-repo/repositories.xml' saved [259443/259443]

Removing /var/db/repos/argent-main ...
rm: cannot remove '/var/db/repos/argent-main/dev-php/PEAR-Mail_Mime/Manifest': Permission non accordée
...
rm: cannot remove '/var/db/repos/argent-main/sys-block/hpssacli/metadata.xml': Permission non accordée
Updating repos.conf ...
sed: couldn't open temporary file /etc/portage/repos.conf/sed7mWfnf: Permission non accordée
!!! Error: (no message)
Call stack:
    * remove_from_repos_conf (repository.eselect:155)
    * do_remove (repository.eselect:443)
    * check_do (core.bash:24)
    * do_action (core.bash:105)
    * main (eselect:189)
exiting
Comment 1 Mike Gilbert gentoo-dev 2022-10-29 15:09:59 UTC
It's entirely possible to manage repositories as a normal user if you configure the permissions in the right way.

I don't see any problem here.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-10-29 15:33:28 UTC
Exactly.  The tool is a tool -- it just does what you tell it to do.  It doesn't second guess you, and there are people with different setups that permit doing stuff like that as non-root.  I don't eselect-repo should try to guess what it can or cannot do.