FreeBSD Bugzilla – Attachment 8848 Details for
Bug 18373
pkg_delete shouldn't insist on root
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
pkg_delete.diff
pkg_delete.diff (text/plain; charset=us-ascii), 2.02 KB, created by
Ben Smithurst
on 2000-05-05 17:11:17 UTC
(
hide
)
Description:
pkg_delete.diff
Filename:
MIME Type:
Creator:
Ben Smithurst
Created:
2000-05-05 17:11:17 UTC
Size:
2.02 KB
patch
obsolete
>Index: main.c >=================================================================== >RCS file: /usr/cvs/src/usr.sbin/pkg_install/delete/main.c,v >retrieving revision 1.17 >diff -u -r1.17 main.c >--- main.c 2000/02/18 07:00:01 1.17 >+++ main.c 2000/05/05 16:10:44 >@@ -28,11 +28,12 @@ > #include "lib.h" > #include "delete.h" > >-static char Options[] = "hvDdnfp:"; >+static char Options[] = "hvDdnfp:r"; > > char *Prefix = NULL; > Boolean NoDeInstall = FALSE; > Boolean CleanDirs = FALSE; >+Boolean NeedRoot = TRUE; > > static void usage __P((void)); > >@@ -58,6 +59,10 @@ > Prefix = optarg; > break; > >+ case 'r': >+ NeedRoot = FALSE; >+ break; >+ > case 'D': > NoDeInstall = TRUE; > break; >@@ -107,8 +112,12 @@ > if (pkgs == start) > warnx("missing package name(s)"), usage(); > *pkgs = NULL; >- if (!Fake && getuid() != 0) >- errx(1, "you must be root to delete packages"); >+ if (!Fake && getuid() != 0) { >+ warnx("you must be root to delete packages%s", >+ NeedRoot ? "" : " (proceeding anyway)"); >+ if (NeedRoot) >+ return EXIT_FAILURE; >+ } > if ((error = pkg_perform(start)) != 0) { > if (Verbose) > warnx("%d package deletion(s) failed", error); >Index: pkg_delete.1 >=================================================================== >RCS file: /usr/cvs/src/usr.sbin/pkg_install/delete/pkg_delete.1,v >retrieving revision 1.16 >diff -u -r1.16 pkg_delete.1 >--- pkg_delete.1 2000/02/29 15:13:53 1.16 >+++ pkg_delete.1 2000/05/05 16:04:28 >@@ -25,7 +25,7 @@ > .Nd a utility for deleting previously installed software package distributions > .Sh SYNOPSIS > .Nm >-.Op Fl vDdnf >+.Op Fl vDdnfr > .Op Fl p Ar prefix > .Ar pkg-name ... > .Sh DESCRIPTION >@@ -95,6 +95,13 @@ > .It Fl f > Force removal of the package, even if a dependency is recorded or the > deinstall or require script fails. >+.It Fl r >+This flag removes the restriction that >+.Nm >+to be run by root, which can be useful for porters if the port has >+been installed to a directory writable by that user, and if >+.Ev PKG_DBDIR >+has been set to a directory writable by that user. > .El > > .Pp
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 18373
:
8847
| 8848