Bareos Bug Tracker
Bareos Bug Tracker

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000380bareos-core[All Projects] installer / packagespublic2014-12-19 18:142015-03-25 18:24
Reporterjoergs 
Assigned To 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSanyOS Version3
Product Version14.2.2 
Target VersionFixed in Version14.2.2 
Summary0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend on Debian systems, database permissions are not set correctly
DescriptionWhen the Bareos catalog has been created by
/usr/lib/bareos/scripts/create_bareos_database
it is owned by the user postres.

If it is created automatically by dbconfig (Bareos >= 14.1), it is owned by the user "bareos".

When migrating from earlier version to Bareos >= 14.1, the database is automatically updated, but the permissions for new tables is not set correct automatically.
Steps To ReproduceInstall bareos-13.2 with postgres backend,
update to bareos-14.2

su - postres -c psql bareos
\dt
\dp
Additional InformationWorkaround:

run

su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges

after updates.
TagsNo tags attached.
bareos-master: impact
bareos-master: action
bareos-18.2: impact
bareos-18.2: action
bareos-17.2: impact
bareos-17.2: action
bareos-16.2: impact
bareos-16.2: action
bareos-15.2: impact
bareos-15.2: action
bareos-14.2: impact
bareos-14.2: action
bareos-13.2: impact
bareos-13.2: action
bareos-12.4: impact
bareos-12.4: action
Attached Files

- Relationships

-  Notes
(0001152)
joergs (administrator)
2014-12-23 21:33

Fix committed to bareos master branch with changesetid 2591.
(0001171)
joergs (administrator)
2014-12-31 18:35

Fix committed to bareos bareos-14.2 branch with changesetid 2609.
(0001191)
joergs (administrator)
2015-01-16 16:44

has been published with bareos >=14.2.2-46.1
(0001449)
mvwieringen (developer)
2015-03-25 16:51

Fix committed to bareos2015 bareos-14.2 branch with changesetid 4486.

- Related Changesets
bareos: master 423c64e8
Timestamp: 2014-12-20 12:44:57
Author: joergs
Ported: N/A
Details ] Diff ]
Debian: fixes a problem when migrating to dbconfig

The Bareos database maintenance scripts for the postgres backend
create the Bareos database using the database administrator account
and grant permission to the Bareos database user.
When a Bareos update requires a database schema update,
the user has to call
update_bareos_tables
and
grant_bareos_privileges.

When using dbconfig (Bareos >= 14.1),
only update_bareos_tables is performed,
as grant_bareos_privileges would require variable substitutions (db_name, db_user and db_password),
which is not supported in dbconfig (dbc_sql_substitutions only works on installing, not on updates).
Therefore it is necessary, that new tables are created as the Bareos database user,
so it automatically has sufficient permissions.
As the Bareos database user can not drop tables not created by himself,
the drop statement must be executed as database administrator user.

This patch implements this.

The resuls to:

Updating from Bareos < 14.1:
database: owner postgres
tables already existing before 14.1: owner postgres, permission to baroes
tables created after 14.1: owner bareos

Installing Bareos >= 14.1:
database: owner bareos
tables: owner bareos

Fixes 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend, database permissions are not set correctly
mod - debian/bareos-database-common.config.in Diff ] File ]
mod - debian/bareos-database-common.postinst.in Diff ] File ]
mod - debian/bareos-database-mysql.install.in Diff ] File ]
mod - debian/bareos-database-postgresql.install.in Diff ] File ]
mod - debian/bareos-database-sqlite3.install.in Diff ] File ]
mod - platforms/debian/Makefile.in Diff ] File ]
bareos: bareos-14.2 10b8d968
Timestamp: 2014-12-20 12:44:57
Author: joergs
Ported: N/A
Details ] Diff ]
Debian: fixes a problem when migrating to dbconfig

The Bareos database maintenance scripts for the postgres backend
create the Bareos database using the database administrator account
and grant permission to the Bareos database user.
When a Bareos update requires a database schema update,
the user has to call
update_bareos_tables
and
grant_bareos_privileges.

When using dbconfig (Bareos >= 14.1),
only update_bareos_tables is performed,
as grant_bareos_privileges would require variable substitutions (db_name, db_user and db_password),
which is not supported in dbconfig (dbc_sql_substitutions only works on installing, not on updates).
Therefore it is necessary, that new tables are created as the Bareos database user,
so it automatically has sufficient permissions.
As the Bareos database user can not drop tables not created by himself,
the drop statement must be executed as database administrator user.

This patch implements this.

The resuls to:

Updating from Bareos < 14.1:
database: owner postgres
tables already existing before 14.1: owner postgres, permission to baroes
tables created after 14.1: owner bareos

Installing Bareos >= 14.1:
database: owner bareos
tables: owner bareos

Fixes 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend, database permissions are not set correctly
mod - debian/bareos-database-common.config.in Diff ] File ]
mod - debian/bareos-database-common.postinst.in Diff ] File ]
mod - debian/bareos-database-mysql.install.in Diff ] File ]
mod - debian/bareos-database-postgresql.install.in Diff ] File ]
mod - debian/bareos-database-sqlite3.install.in Diff ] File ]
mod - platforms/debian/Makefile.in Diff ] File ]
bareos2015: bareos-14.2 63080378
Timestamp: 2014-12-20 13:44:57
Author: joergs
Committer: mvwieringen
Ported: N/A
Details ] Diff ]
Debian: fixes a problem when migrating to dbconfig

The Bareos database maintenance scripts for the postgres backend
create the Bareos database using the database administrator account
and grant permission to the Bareos database user.
When a Bareos update requires a database schema update,
the user has to call
update_bareos_tables
and
grant_bareos_privileges.

When using dbconfig (Bareos >= 14.1),
only update_bareos_tables is performed,
as grant_bareos_privileges would require variable substitutions (db_name, db_user and db_password),
which is not supported in dbconfig (dbc_sql_substitutions only works on installing, not on updates).
Therefore it is necessary, that new tables are created as the Bareos database user,
so it automatically has sufficient permissions.
As the Bareos database user can not drop tables not created by himself,
the drop statement must be executed as database administrator user.

This patch implements this.

The resuls to:

Updating from Bareos < 14.1:
database: owner postgres
tables already existing before 14.1: owner postgres, permission to baroes
tables created after 14.1: owner bareos

Installing Bareos >= 14.1:
database: owner bareos
tables: owner bareos

Fixes 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend, database permissions are not set correctly
mod - debian/bareos-database-common.config.in Diff ] File ]
mod - debian/bareos-database-common.postinst.in Diff ] File ]
mod - debian/bareos-database-mysql.install.in Diff ] File ]
mod - debian/bareos-database-postgresql.install.in Diff ] File ]
mod - debian/bareos-database-sqlite3.install.in Diff ] File ]
mod - platforms/debian/Makefile.in Diff ] File ]
bareos-docs: master acc7aa6d
Timestamp: 2014-12-22 09:20:25
Author: joergs
Ported: N/A
Details ] Diff ]
added hint about updating dbconfig and postgresql

Issues 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend on Debian systems, database permissions are not set correctly
mod - manuals/en/main/catmaintenance.tex Diff ] File ]
mod - manuals/en/main/install.tex Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-12-19 18:14 joergs New Issue
2014-12-19 18:14 joergs Status new => assigned
2014-12-19 18:14 joergs Assigned To => joergs
2014-12-22 10:23 joergs Changeset attached => bareos-docs master acc7aa6d
2014-12-23 21:33 joergs Changeset attached => bareos master 423c64e8
2014-12-23 21:33 joergs Note Added: 0001152
2014-12-23 21:33 joergs Status assigned => resolved
2014-12-23 21:33 joergs Resolution open => fixed
2014-12-31 18:35 joergs Changeset attached => bareos bareos-14.2 10b8d968
2014-12-31 18:35 joergs Note Added: 0001171
2015-01-16 16:44 joergs Note Added: 0001191
2015-01-16 16:44 joergs Status resolved => closed
2015-01-16 16:44 joergs Assigned To joergs =>
2015-01-16 16:44 joergs Fixed in Version => 14.2.2
2015-03-25 16:51 mvwieringen Changeset attached => bareos2015 bareos-14.2 63080378
2015-03-25 16:51 mvwieringen Note Added: 0001449
2015-03-25 16:51 mvwieringen Status closed => resolved
2015-03-25 18:24 joergs Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker