mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
*** empty log message ***
This commit is contained in:
parent
0f7a19f3b0
commit
a9eaa96f83
@ -7,6 +7,10 @@
|
|||||||
gnupg_get_time, fix error() invocation and use getline()
|
gnupg_get_time, fix error() invocation and use getline()
|
||||||
consistently.
|
consistently.
|
||||||
|
|
||||||
|
2004-01-30 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* addgnupghome: Also set the group of copied files.
|
||||||
|
|
||||||
2004-01-30 Werner Koch <wk@gnupg.org>
|
2004-01-30 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* Makefile.am (sbin_SCRIPTS): New, to install addgnupghome.
|
* Makefile.am (sbin_SCRIPTS): New, to install addgnupghome.
|
||||||
|
@ -48,11 +48,22 @@ one_user () {
|
|||||||
error "error creating \`$home/.gnupg'"
|
error "error creating \`$home/.gnupg'"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! chown $user "$home/.gnupg" ; then
|
if ! chown $user "$home/.gnupg" ; then
|
||||||
error "error changing ownership of \`$home/.gnupg'"
|
error "error changing ownership of \`$home/.gnupg'"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
group=$(id -g "$user")
|
||||||
|
[ -z "$group" ] && group="0"
|
||||||
|
|
||||||
|
if [ "$group" -gt 0 ]; then
|
||||||
|
if ! chgrp $group "$home/.gnupg" ; then
|
||||||
|
error "error changing group of \`$home/.gnupg'"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if ! cd "$home/.gnupg" ; then
|
if ! cd "$home/.gnupg" ; then
|
||||||
error "error cd-ing to \`$home/.gnupg'"
|
error "error cd-ing to \`$home/.gnupg'"
|
||||||
return
|
return
|
||||||
@ -63,10 +74,18 @@ one_user () {
|
|||||||
else
|
else
|
||||||
cp /etc/skel/.gnupg/$f $f
|
cp /etc/skel/.gnupg/$f $f
|
||||||
fi
|
fi
|
||||||
chown $user $f
|
if ! chown $user $f ; then
|
||||||
|
error "error changing ownership of \`$f'"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [ "$group" -gt 0 ]; then
|
||||||
|
if ! chgrp $group "$f" ; then
|
||||||
|
error "error changing group of \`$f'"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user