Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libstorage-ng for openSUSE:Factory 
checked in at 2025-08-08 15:10:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new.1085 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Fri Aug  8 15:10:00 2025 rev:311 rq:1298116 version:4.5.273

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2025-08-06 14:31:20.495135826 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1085/libstorage-ng.changes    
2025-08-08 15:10:05.059669847 +0200
@@ -1,0 +2,7 @@
+Thu Aug 7 10:05:26 UTC 2025 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#1037
+- added function BlkDevice::is_valid_dm_table_name
+- 4.5.273
+
+--------------------------------------------------------------------

Old:
----
  libstorage-ng-4.5.272.tar.xz

New:
----
  libstorage-ng-4.5.273.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.gGBGk3/_old  2025-08-08 15:10:07.151757460 +0200
+++ /var/tmp/diff_new_pack.gGBGk3/_new  2025-08-08 15:10:07.179758633 +0200
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.5.272
+Version:        4.5.273
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.5.272.tar.xz -> libstorage-ng-4.5.273.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.272/LIBVERSION 
new/libstorage-ng-4.5.273/LIBVERSION
--- old/libstorage-ng-4.5.272/LIBVERSION        2025-08-04 09:10:23.000000000 
+0200
+++ new/libstorage-ng-4.5.273/LIBVERSION        2025-08-07 12:05:26.000000000 
+0200
@@ -1 +1 @@
-1.102.0
+1.103.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.272/VERSION 
new/libstorage-ng-4.5.273/VERSION
--- old/libstorage-ng-4.5.272/VERSION   2025-08-04 09:10:23.000000000 +0200
+++ new/libstorage-ng-4.5.273/VERSION   2025-08-07 12:05:26.000000000 +0200
@@ -1 +1 @@
-4.5.272
+4.5.273
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.272/storage/Devices/BlkDevice.cc 
new/libstorage-ng-4.5.273/storage/Devices/BlkDevice.cc
--- old/libstorage-ng-4.5.272/storage/Devices/BlkDevice.cc      2025-08-04 
09:10:23.000000000 +0200
+++ new/libstorage-ng-4.5.273/storage/Devices/BlkDevice.cc      2025-08-07 
12:05:26.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2021] SUSE LLC
+ * Copyright (c) [2016-2025] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -239,6 +239,13 @@
     }
 
 
+    bool
+    BlkDevice::is_valid_dm_table_name(const string& dm_table_name)
+    {
+       return Impl::is_valid_dm_table_name(dm_table_name);
+    }
+
+
     vector<BlkDevice*>
     BlkDevice::get_all(Devicegraph* devicegraph)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.272/storage/Devices/BlkDevice.h 
new/libstorage-ng-4.5.273/storage/Devices/BlkDevice.h
--- old/libstorage-ng-4.5.272/storage/Devices/BlkDevice.h       2025-08-04 
09:10:23.000000000 +0200
+++ new/libstorage-ng-4.5.273/storage/Devices/BlkDevice.h       2025-08-07 
12:05:26.000000000 +0200
@@ -24,6 +24,7 @@
 #ifndef STORAGE_BLK_DEVICE_H
 #define STORAGE_BLK_DEVICE_H
 
+
 #include <vector>
 
 #include "storage/Utils/Swig.h"
@@ -171,6 +172,11 @@
        void set_dm_table_name(const std::string& dm_table_name);
 
        /**
+        * Check whether the DM table name is valid. Does not check for 
collisions.
+        */
+       static bool is_valid_dm_table_name(const std::string& dm_table_name);
+
+       /**
         * Get all BlkDevices.
         */
        static std::vector<BlkDevice*> get_all(Devicegraph* devicegraph);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.272/storage/Devices/BlkDeviceImpl.cc 
new/libstorage-ng-4.5.273/storage/Devices/BlkDeviceImpl.cc
--- old/libstorage-ng-4.5.272/storage/Devices/BlkDeviceImpl.cc  2025-08-04 
09:10:23.000000000 +0200
+++ new/libstorage-ng-4.5.273/storage/Devices/BlkDeviceImpl.cc  2025-08-07 
12:05:26.000000000 +0200
@@ -724,6 +724,22 @@
     }
 
 
+    bool
+    BlkDevice::Impl::is_valid_dm_table_name(const string& dm_table_name)
+    {
+       if (dm_table_name.find_first_of("/") != string::npos)
+           return false;
+
+       if (dm_table_name == "." || dm_table_name == "..")
+           return false;
+
+       if (dm_table_name.size() > 127)
+           return false;
+
+       return true;
+    }
+
+
     BlkFilesystem*
     BlkDevice::Impl::create_blk_filesystem(FsType fs_type)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.272/storage/Devices/BlkDeviceImpl.h 
new/libstorage-ng-4.5.273/storage/Devices/BlkDeviceImpl.h
--- old/libstorage-ng-4.5.272/storage/Devices/BlkDeviceImpl.h   2025-08-04 
09:10:23.000000000 +0200
+++ new/libstorage-ng-4.5.273/storage/Devices/BlkDeviceImpl.h   2025-08-07 
12:05:26.000000000 +0200
@@ -119,6 +119,8 @@
        const string& get_dm_table_name() const { return dm_table_name; }
        virtual void set_dm_table_name(const string& dm_table_name) { 
Impl::dm_table_name = dm_table_name; }
 
+       static bool is_valid_dm_table_name(const string& dm_table_name);
+
        BlkFilesystem* create_blk_filesystem(FsType fs_type);
 
        bool has_blk_filesystem() const;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.272/storage/Devices/Encryption.cc 
new/libstorage-ng-4.5.273/storage/Devices/Encryption.cc
--- old/libstorage-ng-4.5.272/storage/Devices/Encryption.cc     2025-08-04 
09:10:23.000000000 +0200
+++ new/libstorage-ng-4.5.273/storage/Devices/Encryption.cc     2025-08-07 
12:05:26.000000000 +0200
@@ -38,9 +38,9 @@
 
 
     Encryption*
-    Encryption::create(Devicegraph* devicegraph, const string& name)
+    Encryption::create(Devicegraph* devicegraph, const string& dm_table_name)
     {
-       shared_ptr<Encryption> encryption = make_shared<Encryption>(new 
Encryption::Impl(name));
+       shared_ptr<Encryption> encryption = make_shared<Encryption>(new 
Encryption::Impl(dm_table_name));
        Device::Impl::create(devicegraph, encryption);
        return encryption.get();
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.272/storage/Devices/Encryption.h 
new/libstorage-ng-4.5.273/storage/Devices/Encryption.h
--- old/libstorage-ng-4.5.272/storage/Devices/Encryption.h      2025-08-04 
09:10:23.000000000 +0200
+++ new/libstorage-ng-4.5.273/storage/Devices/Encryption.h      2025-08-07 
12:05:26.000000000 +0200
@@ -61,7 +61,7 @@
         *
         * @see Device::create(Devicegraph*)
         */
-       static Encryption* create(Devicegraph* devicegraph, const std::string& 
name);
+       static Encryption* create(Devicegraph* devicegraph, const std::string& 
dm_table_name);
 
        static Encryption* load(Devicegraph* devicegraph, const xmlNode* node);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.272/testsuite/valid-names.cc 
new/libstorage-ng-4.5.273/testsuite/valid-names.cc
--- old/libstorage-ng-4.5.272/testsuite/valid-names.cc  2025-08-04 
09:10:23.000000000 +0200
+++ new/libstorage-ng-4.5.273/testsuite/valid-names.cc  2025-08-07 
12:05:26.000000000 +0200
@@ -9,6 +9,7 @@
 #include "storage/Devices/LvmVg.h"
 #include "storage/Devices/LvmLv.h"
 #include "storage/Devices/Md.h"
+#include "storage/Devices/BlkDevice.h"
 
 
 using namespace std;
@@ -79,3 +80,15 @@
     BOOST_CHECK(!Md::is_valid_name("/dev/md12345678901234567890"));
     BOOST_CHECK(!Md::is_valid_name("/dev/md/12345678901234567890"));
 }
+
+
+BOOST_AUTO_TEST_CASE(valid_dm_table_name)
+{
+    BOOST_CHECK(BlkDevice::is_valid_dm_table_name("cr-1"));
+}
+
+
+BOOST_AUTO_TEST_CASE(invalid_dm_table_name)
+{
+    BOOST_CHECK(!BlkDevice::is_valid_dm_table_name("cr/1"));
+}

Reply via email to