forgot to checkin update file
This commit is contained in:
parent
41ae745b17
commit
87e407aa90
|
@ -0,0 +1,3 @@
|
|||
ALTER TABLE `Users`
|
||||
ADD COLUMN `TokenMinExpiry` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `MonitorIds`,
|
||||
ADD COLUMN `APIEnabled` tinyint(3) UNSIGNED NOT NULL default 1 AFTER `TokenMinExpiry`;
|
|
@ -26,7 +26,7 @@ Build-Depends: debhelper (>= 9), cmake
|
|||
, libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl
|
||||
, libsys-cpu-perl, libsys-meminfo-perl
|
||||
, libdata-uuid-perl
|
||||
, libssl-dev
|
||||
, libssl-dev,libdigest-bcrypt-perl
|
||||
Standards-Version: 3.9.4
|
||||
|
||||
Package: zoneminder
|
||||
|
@ -52,7 +52,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
|
|||
, zip
|
||||
, libvlccore5 | libvlccore7 | libvlccore8, libvlc5
|
||||
, libpolkit-gobject-1-0, php5-gd
|
||||
, libssl
|
||||
, libssl,libdigest-bcrypt-perl
|
||||
Recommends: mysql-server | mariadb-server
|
||||
Description: Video camera security and surveillance solution
|
||||
ZoneMinder is intended for use in single or multi-camera video security
|
||||
|
|
|
@ -312,6 +312,7 @@ if ( $migrateEvents ) {
|
|||
if ( $freshen ) {
|
||||
print( "\nFreshening configuration in database\n" );
|
||||
migratePaths();
|
||||
migratePasswords();
|
||||
ZoneMinder::Config::loadConfigFromDB();
|
||||
ZoneMinder::Config::saveConfigToDB();
|
||||
}
|
||||
|
@ -999,6 +1000,20 @@ sub patchDB {
|
|||
|
||||
}
|
||||
|
||||
sub migratePasswords {
|
||||
|
||||
print ("****** MIGRATION");
|
||||
my $sql = "select * from Users";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
my $res = $sth->execute() or die( "Can't execute: ".$sth->errstr() );
|
||||
while( my $user = $sth->fetchrow_hashref() ) {
|
||||
my $scheme = substr $user->{Password}, 0, 1;
|
||||
if ($scheme eq "*") {
|
||||
print ("*********** HOLY GODZILLA ".$user->{Username}. " uses PASSWORD");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub migratePaths {
|
||||
|
||||
my $customConfigFile = '@ZM_CONFIG_SUBDIR@/zmcustom.conf';
|
||||
|
|
Loading…
Reference in New Issue