system-tools-backends: Fix user module.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackware-id.org>
This commit is contained in:
Willy Sudiarto Raharjo 2015-01-14 21:28:05 +07:00
parent 872471c504
commit 72804a7d75
2 changed files with 45 additions and 7 deletions

View file

@ -0,0 +1,34 @@
--- system-tools-backends-2.10.2/SelfConfig.pm.orig 2015-01-14 21:14:11.499164540 +0700
+++ system-tools-backends-2.10.2/SelfConfig.pm 2015-01-14 21:15:28.974094285 +0700
@@ -30,7 +30,8 @@
my $OBJECT_PATH = "$Utils::Backend::DBUS_PATH/$OBJECT_NAME";
# user is only allowed to change his own GECOS fields, locale, location
-my $format = [ "uint32", [ "array", "string" ], "string", "string" ];
+my $get_format = [ [ "array", "string" ], "string", "string" ];
+my $set_format = [ "uint32", [ "array", "string" ], "string", "string" ];
sub new
{
@@ -43,8 +44,8 @@
}
# UID is filled by dispatcher
-dbus_method ("get", "uint32", $format);
-dbus_method ("set", $format, []);
+dbus_method ("get", [ "uint32" ], $get_format);
+dbus_method ("set", $set_format, []);
sub get
{
--- system-tools-backends-2.10.2/Users/Users.pm.orig 2015-01-14 21:15:49.530810417 +0700
+++ system-tools-backends-2.10.2/Users/Users.pm 2015-01-14 21:16:26.373301774 +0700
@@ -838,7 +838,7 @@
foreach $user (@$users)
{
next if ($uid != $$user[$UID]);
- return ($$user[$COMMENT], $$user[$LOCALE]);
+ return ($$user[$COMMENT], $$user[$LOCALE], $$user[$LOCATION]);
}
return ([""], "");

View file

@ -2,7 +2,7 @@
# Slackware build script for system-tools-backends
# Copyright 2013 Willy Sudiarto Raharjo <willysr@slackware-id.org>
# Copyright 2013-2015 Willy Sudiarto Raharjo <willysr@slackware-id.org>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -24,7 +24,7 @@
PRGNAM=system-tools-backends
VERSION=${VERSION:-2.10.2}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_msb}
if [ -z "$ARCH" ]; then
@ -67,15 +67,19 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Added support to Slackware 14.0 and 14.1
patch -p0 < $CWD/services.patch
# Patch user module
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761806
patch -p1 < $CWD/fix-user-module.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \