#!/usr/bin/perl
+package IkiWiki;
+
use warnings;
use strict;
use Storable;
use IkiWiki;
-package IkiWiki;
-
sub userinfo_retrieve () { #{{{
my $userinfo=eval{ Storable::lock_retrieve("$config{wikistatedir}/userdb") };
return $userinfo;
my $newfile="$config{wikistatedir}/userdb.new";
my $oldmask=umask(077);
- my $ret=Storable::lock_store($userinfo, $newfile);
+ my $ret=Storable::lock_nstore($userinfo, $newfile);
umask($oldmask);
if (defined $ret && $ret) {
if (! rename($newfile, "$config{wikistatedir}/userdb")) {
return grep { $_ eq $user_name } @{$config{adminuser}};
} #}}}
+# XXX deprecated, should be removed eventually
sub get_banned_users () { #{{{
my @ret;
my $userinfo=userinfo_retrieve();
return @ret;
} #}}}
+# XXX deprecated, should be removed eventually
sub set_banned_users (@) { #{{{
my %banned=map { $_ => 1 } @_;
my $userinfo=userinfo_retrieve();