]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdmon.c
util: Introduce md_get_disk_info()
[thirdparty/mdadm.git] / mdmon.c
diff --git a/mdmon.c b/mdmon.c
index b84d4d9520485c04e55e7ebaccc844e0e81f2f67..95e9bbae42a606d3435a97c71a52b73bff8b4591 100644 (file)
--- a/mdmon.c
+++ b/mdmon.c
@@ -67,6 +67,8 @@
 #include       "mdadm.h"
 #include       "mdmon.h"
 
+char const Name[] = "mdmon";
+
 struct active_array *discard_this;
 struct active_array *pending_discard;
 
@@ -232,7 +234,8 @@ static int make_control_sock(char *devname)
 
        addr.sun_family = PF_LOCAL;
        strcpy(addr.sun_path, path);
-       if (bind(sfd, &addr, sizeof(addr)) < 0) {
+       umask(077); /* ensure no world write access */
+       if (bind(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
                close(sfd);
                return -1;
        }
@@ -577,11 +580,6 @@ int restore_stripes(int *dest, unsigned long long *offsets,
        return 1;
 }
 
-void abort_reshape(struct mdinfo *sra)
-{
-       return;
-}
-
 int save_stripes(int *source, unsigned long long *offsets,
                 int raid_disks, int chunk_size, int level, int layout,
                 int nwrites, int *dest,
@@ -590,3 +588,10 @@ int save_stripes(int *source, unsigned long long *offsets,
 {
        return 0;
 }
+
+struct superswitch super0 = {
+       .name = "0.90",
+};
+struct superswitch super1 = {
+       .name = "1.x",
+};