Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package google-guest-oslogin for 
openSUSE:Factory checked in at 2021-07-20 15:39:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-guest-oslogin (Old)
 and      /work/SRC/openSUSE:Factory/.google-guest-oslogin.new.2632 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "google-guest-oslogin"

Tue Jul 20 15:39:19 2021 rev:9 rq:907139 version:20210707.00

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/google-guest-oslogin/google-guest-oslogin.changes    
    2021-06-23 17:38:46.724516627 +0200
+++ 
/work/SRC/openSUSE:Factory/.google-guest-oslogin.new.2632/google-guest-oslogin.changes
      2021-07-20 15:40:00.525530828 +0200
@@ -1,0 +2,8 @@
+Mon Jul 19 12:28:53 UTC 2021 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Update to version 20210707.00
+  * throw exceptions in cache_refresh (#64)
+- from version 20210702.00
+  * Use IP address for calling the metadata server. (#63)
+
+-------------------------------------------------------------------

Old:
----
  google-guest-oslogin-20210618.00.tar.gz

New:
----
  google-guest-oslogin-20210707.00.tar.gz

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

Other differences:
------------------
++++++ google-guest-oslogin.spec ++++++
--- /var/tmp/diff_new_pack.4mar9W/_old  2021-07-20 15:40:01.965533404 +0200
+++ /var/tmp/diff_new_pack.4mar9W/_new  2021-07-20 15:40:01.969533411 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           google-guest-oslogin
-Version:        20210618.00
+Version:        20210707.00
 Release:        0
 Summary:        Google Cloud Guest OS Login
 License:        Apache-2.0

++++++ google-guest-oslogin-20210618.00.tar.gz -> 
google-guest-oslogin-20210707.00.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/guest-oslogin-20210618.00/src/cache_refresh/cache_refresh.cc 
new/guest-oslogin-20210707.00/src/cache_refresh/cache_refresh.cc
--- old/guest-oslogin-20210618.00/src/cache_refresh/cache_refresh.cc    
2021-06-18 21:56:14.000000000 +0200
+++ new/guest-oslogin-20210707.00/src/cache_refresh/cache_refresh.cc    
2021-07-07 20:38:48.000000000 +0200
@@ -127,6 +127,7 @@
     return -1;
   }
   cache_file << std::unitbuf; // enable automatic flushing
+  cache_file.exceptions( cache_file.exceptions() | std::ofstream::failbit | 
std::ofstream::badbit );
   chown(kDefaultBackupGroupPath, 0, 0);
   chmod(kDefaultBackupGroupPath, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
 
@@ -157,22 +158,35 @@
              grp.gr_name, error_code);
       continue;
     }
-    cache_file << grp.gr_name << ":" << grp.gr_passwd << ":" << grp.gr_gid << 
":";
-    for (int i = 0; i < (int)users.size(); i++) {
-      if (i > 0) {
-        cache_file << ",";
+    try {
+      cache_file << grp.gr_name << ":" << grp.gr_passwd << ":" << grp.gr_gid 
<< ":";
+      for (int i = 0; i < (int)users.size(); i++) {
+        if (i > 0) {
+          cache_file << ",";
+        }
+        cache_file << users[i];
       }
-      cache_file << users[i];
+      cache_file << "\n";
     }
-    cache_file << "\n";
+    catch (std::ofstream::failure e) {
+      syslog(LOG_ERR, "Exception writing file");
+      error_code = ENOENT;
+      break;
+    }
+  }
+  try {
+    cache_file.close();
+  }
+  catch (std::ofstream::failure e) {
+    syslog(LOG_ERR, "Exception closing file");
+    error_code = ENOENT;
   }
-  cache_file.close();
 
   if (error_code == ENOMSG) {
     remove(kDefaultBackupGroupPath);
     return 0;
   } else if (error_code == ENOENT) {
-    syslog(LOG_ERR, "Failed to get groups, not updating passwd cache file, 
removing %s.", kDefaultBackupGroupPath);
+    syslog(LOG_ERR, "Failed to get groups, not updating group cache file, 
removing %s.", kDefaultBackupGroupPath);
     // If the cache file already exists, we don't want to overwrite it on a
     // server error. So remove the backup file and return here.
     struct stat buffer;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/guest-oslogin-20210618.00/src/include/oslogin_utils.h 
new/guest-oslogin-20210707.00/src/include/oslogin_utils.h
--- old/guest-oslogin-20210618.00/src/include/oslogin_utils.h   2021-06-18 
21:56:14.000000000 +0200
+++ new/guest-oslogin-20210707.00/src/include/oslogin_utils.h   2021-07-07 
20:38:48.000000000 +0200
@@ -50,7 +50,7 @@
 
 // Metadata server URL.
 static const char kMetadataServerUrl[] =
-    "http://metadata.google.internal/computeMetadata/v1/oslogin/";;
+    "http://169.254.169.254/computeMetadata/v1/oslogin/";;
 
 // BufferManager encapsulates and manages a buffer and length. This class is 
not
 // thread safe.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-oslogin-20210618.00/test/Makefile 
new/guest-oslogin-20210707.00/test/Makefile
--- old/guest-oslogin-20210618.00/test/Makefile 2021-06-18 21:56:14.000000000 
+0200
+++ new/guest-oslogin-20210707.00/test/Makefile 2021-07-07 20:38:48.000000000 
+0200
@@ -39,9 +39,9 @@
        $(TEST_RUNNER) ${GTESTARGS}
 
 ping :
-       nc -vzw2 metadata.google.internal 80 >/dev/null 2>&1
+       nc -vzw2 169.254.169.254 80 >/dev/null 2>&1
 
 reset :
-       curl -Ss http://metadata.google.internal/reset >/dev/null 2>&1
+       curl -Ss http://169.254.169.254/reset >/dev/null 2>&1
 
 .PHONY : all clean alltests ping reset gtest prowtest non_network_tests 
network_tests
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/guest-oslogin-20210618.00/test/oslogin_utils_test.cc 
new/guest-oslogin-20210707.00/test/oslogin_utils_test.cc
--- old/guest-oslogin-20210618.00/test/oslogin_utils_test.cc    2021-06-18 
21:56:14.000000000 +0200
+++ new/guest-oslogin-20210707.00/test/oslogin_utils_test.cc    2021-07-07 
20:38:48.000000000 +0200
@@ -416,7 +416,7 @@
 TEST(GetUsersForGroupTest, GetUsersForGroupSucceeds) {
   string response;
   long http_code;
-  ASSERT_TRUE(HttpGet("http://metadata.google.internal/reset";, &response, 
&http_code));
+  ASSERT_TRUE(HttpGet("http://169.254.169.254/reset";, &response, &http_code));
 
   std::vector<string> users;
   int errnop = 0;
@@ -430,7 +430,7 @@
 TEST(GetGroupByTest, GetGroupByNameSucceeds) {
   string response;
   long http_code;
-  ASSERT_TRUE(HttpGet("http://metadata.google.internal/reset";, &response, 
&http_code));
+  ASSERT_TRUE(HttpGet("http://169.254.169.254/reset";, &response, &http_code));
   ASSERT_EQ(http_code, 200);
 
   size_t buflen = 200 * sizeof(char);
@@ -447,7 +447,7 @@
 TEST(GetGroupByTest, GetGroupByGIDSucceeds) {
   string response;
   long http_code;
-  ASSERT_TRUE(HttpGet("http://metadata.google.internal/reset";, &response, 
&http_code));
+  ASSERT_TRUE(HttpGet("http://169.254.169.254/reset";, &response, &http_code));
 
   size_t buflen = 200 * sizeof(char);
   char* buffer = (char*)malloc(buflen);

Reply via email to