]> arthur.barton.de Git - netdata.git/commitdiff
Merge pull request #865 from ktsaou/master
authorCosta Tsaousis <costa@tsaousis.gr>
Wed, 31 Aug 2016 05:25:45 +0000 (08:25 +0300)
committerGitHub <noreply@github.com>
Wed, 31 Aug 2016 05:25:45 +0000 (08:25 +0300)
minor fixes

configs.signatures
src/registry.c
src/web_server.c
web/index.html

index 5eb4b387b6fafb152d28f16a94e560eefa75792c..bf3df2234af2a36d8d6af5c0a749966f31c8e015 100644 (file)
@@ -18,6 +18,7 @@ declare -A configs_signatures=(
   ['a9cd91675467c5426f5b51c47602c889']='apps_groups.conf'
   ['acaa6731a272f6d251afb357e99b518f']='apps_groups.conf'
   ['bb51112d01ff20053196a57632df8962']='apps_groups.conf'
+  ['d9036091e2232fc2b8bfa8c7484dea28']='apps_groups.conf'
   ['d9258e671d0d0b6498af1ce16ef030d2']='apps_groups.conf'
   ['ebd0612ccc5807524ebb2b647e3e56c9']='apps_groups.conf'
   ['f2f1b8656f5011e965ac45b818cf668d']='apps_groups.conf'
index f2319c478257128a24f421ca5969dc6e830f72cb..d64a9437ed331227643681df2e2d38e3f1a038cd 100644 (file)
@@ -1227,6 +1227,21 @@ int registry_request_switch_json(struct web_client *w, char *person_guid, char *
 // ----------------------------------------------------------------------------
 // REGISTRY THIS MACHINE UNIQUE ID
 
+static inline int is_machine_guid_blacklisted(const char *guid) {
+    // these are machine GUIDs that have been included in distribution packages.
+    // we blacklist them here, so that the next version of netdata will generate
+    // new ones.
+
+    if(!strcmp(guid, "8a795b0c-2311-11e6-8563-000c295076a6")
+    || !strcmp(guid, "4aed1458-1c3e-11e6-a53f-000c290fc8f5")
+    ) {
+        error("Blacklisted machine GUID '%s' found.", guid);
+        return 1;
+    }
+
+    return 0;
+}
+
 char *registry_get_this_machine_guid(void) {
     if(likely(registry.machine_guid[0]))
         return registry.machine_guid;
@@ -1245,6 +1260,8 @@ char *registry_get_this_machine_guid(void) {
 
                 registry.machine_guid[0] = '\0';
             }
+            else if(is_machine_guid_blacklisted(registry.machine_guid))
+                registry.machine_guid[0] = '\0';
         }
         close(fd);
     }
index cf3687f3e6031779d8b17769730df8ffa739b594..a9beff88c26db7b68832c9db5d45b1c45cda764d 100644 (file)
@@ -38,10 +38,12 @@ int accept4(int sock, struct sockaddr *addr, socklen_t *addrlen, int flags) {
         flags &= ~SOCK_NONBLOCK;
     }
 
+#ifdef SOCK_CLOEXEC
     if (flags & SOCK_CLOEXEC) {
         newflags |= O_CLOEXEC;
         flags &= ~SOCK_CLOEXEC;
     }
+#endif
 
     if (flags) {
         errno = -EINVAL;
index 90116c23797dc6551c916dcc7d7a1bf6c6f4fad9..40c16725bd8f44a439a14ba5392e973f347dcee1 100644 (file)
@@ -2706,7 +2706,6 @@ function downloadAllCharts(netdata_url) {
                     var chart = charts[x];
                     data.charts_by_name[chart.name] = chart;
                 }
-                console.log(options.data);
 
                 // update the dashboard hostname
                 document.getElementById('hostname').innerHTML = options.hostname;