diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2019-07-03 12:51:03 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2019-07-03 12:51:03 +0000 |
commit | b74460174e8bf77ff7f53d9783758ad68c66f399 (patch) | |
tree | 07c5d151ecbb9da76e6608b5e6178b8969660f1c /usr.sbin/pkg_add | |
parent | 5ba9d6455ddbb43a2a5ee08026d4c3a9d3b31b9d (diff) |
make error message more explicit, so that ppl don't get confused by the
privsep
Diffstat (limited to 'usr.sbin/pkg_add')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 6 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Temp.pm | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index 36e754011e9..0516f9d9e71 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepository.pm,v 1.160 2018/04/22 09:16:15 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.161 2019/07/03 12:51:02 espie Exp $ # # Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org> # @@ -1023,7 +1023,9 @@ sub setup_session my ($fh, undef) = OpenBSD::Temp::fh_file("session", sub { unlink(shift); }); if (!defined $fh) { - $self->{state}->fatal("Can't write session into tmp directory"); + $self->{state}->fatal( + "User #1 can't write session into #2 directory", $user, + OpenBSD::Temp->tempbase); } $self->{fh} = $fh; # XXX store the full fh and not the fileno } diff --git a/usr.sbin/pkg_add/OpenBSD/Temp.pm b/usr.sbin/pkg_add/OpenBSD/Temp.pm index fe4e34d48fe..0dde125363e 100644 --- a/usr.sbin/pkg_add/OpenBSD/Temp.pm +++ b/usr.sbin/pkg_add/OpenBSD/Temp.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Temp.pm,v 1.29 2018/10/04 09:17:00 espie Exp $ +# $OpenBSD: Temp.pm,v 1.30 2019/07/03 12:51:02 espie Exp $ # # Copyright (c) 2003-2005 Marc Espie <espie@openbsd.org> # @@ -121,4 +121,9 @@ sub permanent_dir return OpenBSD::MkTemp::mkdtemp($template); } +sub tempbase +{ + return $tempbase; +} + 1; |