├── tests ├── data │ ├── test01 │ │ ├── 04-query │ │ ├── 05-query │ │ ├── 99-unregistration-no-security │ │ ├── 01-enroll │ │ ├── 99-unregistration │ │ ├── 03-query │ │ ├── 02-query-no-security │ │ ├── 03-registration │ │ ├── 01-registration-no-security │ │ └── 02-registration │ ├── Test01 │ │ ├── deregister-no-security │ │ ├── enroll │ │ ├── deregister │ │ ├── query │ │ ├── query-no-security │ │ ├── registration-no-security │ │ └── registration │ ├── Test03 │ │ ├── deregister2-no-security │ │ ├── enroll │ │ ├── deregister2 │ │ ├── deregister1-no-security │ │ ├── registration-no-security │ │ ├── deregister1 │ │ └── registration │ ├── test05 │ │ ├── 02-expired-no-security │ │ ├── 01-enroll │ │ ├── 03-expired │ │ ├── 01-registration-no-security │ │ └── 02-registration │ ├── test07 │ │ ├── 02-expired-no-security │ │ ├── 04-expired-no-security │ │ ├── 01-enroll │ │ ├── 03-expired │ │ ├── 05-expired │ │ ├── 01-registration-no-security │ │ ├── 03-registration-no-security │ │ └── 02-registration │ ├── test03 │ │ ├── 03-unregistration-no-security │ │ ├── 99-unregistration │ │ ├── 01-enroll │ │ ├── 04-unregistration │ │ ├── 02-unregistration-no-security │ │ ├── 01-registration-no-security │ │ ├── 03-unregistration │ │ └── 02-registration │ ├── Test02 │ │ ├── query4 │ │ ├── query4-no-security │ │ ├── enroll1 │ │ ├── query1-1 │ │ ├── query1-2 │ │ ├── query1-2-no-security │ │ ├── query1-1-no-security │ │ ├── enroll2 │ │ ├── registration1-no-security │ │ ├── query2-1 │ │ ├── query2-1-no-security │ │ ├── query2-2 │ │ ├── query2-2-no-security │ │ ├── query3 │ │ └── query3-no-security │ ├── test02 │ │ ├── 11-query │ │ ├── 09-query-no-security │ │ ├── 01-enroll │ │ ├── 04-query │ │ ├── 05-query │ │ ├── 09-query │ │ ├── 03-query-no-security │ │ ├── 07-query-no-security │ │ ├── 02-query-no-security │ │ ├── 02-enroll │ │ ├── 05-query-no-security │ │ ├── 06-query-no-security │ │ ├── 07-query │ │ └── 08-query │ ├── Test04 │ │ ├── enroll │ │ ├── restart-no-security │ │ ├── registration-no-security │ │ ├── restart │ │ └── registration │ ├── Test05 │ │ ├── enroll │ │ ├── expired-no-security │ │ ├── registration-no-security │ │ ├── expired │ │ └── registration │ ├── Test06 │ │ ├── enroll │ │ ├── deregister-no-security │ │ ├── registration1-no-security │ │ ├── registration2-1-no-security │ │ ├── registration2-2-no-security │ │ ├── dd-registration1-no-security │ │ ├── registration3-no-security │ │ ├── deregister │ │ ├── dd-registration2-no-security │ │ ├── registration6-no-security │ │ ├── registration1 │ │ ├── registration2-1 │ │ └── registration2-2 │ ├── Test07 │ │ ├── enroll │ │ ├── expired1-no-security │ │ ├── registration1-no-security │ │ ├── expired2-no-security │ │ ├── expired1 │ │ └── registration1 │ ├── test04 │ │ ├── 01-enroll │ │ ├── 04-query │ │ ├── 03-query-no-security │ │ ├── 02-restart-no-security │ │ ├── 01-registration-no-security │ │ ├── 03-restart │ │ └── 02-registration │ ├── test06 │ │ ├── 01-enroll │ │ ├── 09-unregistration-no-security │ │ ├── 01-registration-no-security │ │ ├── 02-registration-no-security │ │ ├── 03-registration-no-security │ │ ├── 04-dd-registration-no-security │ │ ├── 05-registration-no-security │ │ ├── 10-unregistration │ │ ├── 10-registration-no-security │ │ ├── 06-dd-registration-no-security │ │ ├── 02-registration │ │ ├── 03-registration │ │ └── 04-registration │ ├── Test09 │ │ └── pauw2-no-security │ ├── Test10 │ │ ├── expired1-no-security │ │ └── expired2-no-security │ ├── test10 │ │ ├── 01-pauw3-no-security │ │ ├── 03-pauw3-no-security │ │ ├── 02-expired-no-security │ │ └── 04-expired-no-security │ ├── test09 │ │ └── 01-pauw2-no-security │ ├── Test11 │ │ └── pauw2-no-security │ └── test11 │ │ └── 01-pauw4-no-security ├── .gitignore ├── client.conf ├── meson.build ├── server.conf └── README.md ├── include └── libisns │ ├── .gitignore │ ├── meson.build │ ├── paths.h.in │ ├── source.h │ └── types.h ├── .gitignore ├── etc ├── meson.build ├── openisns.init ├── isnsadm.conf └── isnsdd.conf ├── isnsd.socket ├── libisns.pc ├── doc ├── meson.build └── isnssetup.8 ├── isnsd.service ├── internal.h ├── meson_options.txt ├── HACKING ├── vendor.c ├── isnssetup ├── .travis.yml ├── vendor.h ├── error.c ├── pidfile.c └── authblock.c /tests/data/test01/04-query: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/data/test01/05-query: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /include/libisns/.gitignore: -------------------------------------------------------------------------------- 1 | paths.h 2 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | pauw[1-4] 2 | *.pyc 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | tags 3 | cscope.files 4 | .setup* 5 | -------------------------------------------------------------------------------- /etc/meson.build: -------------------------------------------------------------------------------- 1 | # meson build file for open-isns etc files 2 | 3 | config_files = files([ 4 | 'isnsd.conf', 5 | 'isnsdd.conf', 6 | 'isnsadm.conf']) 7 | -------------------------------------------------------------------------------- /tests/data/Test01/deregister-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test01/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------------------------------------------------------------------------- /tests/data/Test03/deregister2-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test03/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------------------------------------------------------------------------- /tests/data/test05/02-expired-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test05/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------------------------------------------------------------------------- /tests/data/test07/02-expired-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test07/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------------------------------------------------------------------------- /tests/data/test07/04-expired-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test07/server0/database 3 | Last EID: 3 4 | Last Index: 11 5 | -------------------------------------------------------------------------------- /tests/data/test01/99-unregistration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test01/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------------------------------------------------------------------------- /tests/data/test03/03-unregistration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test03/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------------------------------------------------------------------------- /isnsd.socket: -------------------------------------------------------------------------------- 1 | [Socket] 2 | ListenStream=/var/run/isnsctl 3 | PassCredentials=true 4 | 5 | [Socket] 6 | ListenStream=3205 7 | 8 | [Install] 9 | WantedBy=sockets.target 10 | -------------------------------------------------------------------------------- /libisns.pc: -------------------------------------------------------------------------------- 1 | includedir=/usr/include 2 | libdir=/usr/lib64 3 | 4 | Name: libisns 5 | Version: 0.103 6 | Description: iSNS user space library 7 | Libs: -L${libdir} -lisns 8 | Cflags: -I${includedir} 9 | -------------------------------------------------------------------------------- /tests/client.conf: -------------------------------------------------------------------------------- 1 | SourceName = @NOT_SET@ 2 | AuthName = @NOT_SET@ 3 | ServerAddress = @NOT_SET@ 4 | BindAddress = @NOT_SET@ 5 | Security = @NOT_SET@ 6 | AuthKeyFile = @NOT_SET@ 7 | ServerKeyFile = @NOT_SET@ 8 | ControlSocket = @NOT_SET@ 9 | -------------------------------------------------------------------------------- /tests/meson.build: -------------------------------------------------------------------------------- 1 | # meson build control file for open-isns tests 2 | 3 | tests = ['pauw1', 'pauw2', 'pauw3', 'pauw4'] 4 | 5 | test_prog = find_program('test-isns.py') 6 | test('unittest the daemon', test_prog, args: ['-f', '-D', '../tests'], timeout: 120) 7 | -------------------------------------------------------------------------------- /doc/meson.build: -------------------------------------------------------------------------------- 1 | # meson build file for open-isns doc (man pages) 2 | 3 | # do not install isnssetup.8, as it's a man page 4 | # for aninternal script 5 | man8_pages = files([ 6 | 'isnsd.8', 7 | 'isnsdd.8', 8 | 'isnsadm.8']) 9 | man5_pages = files([ 10 | 'isns_config.5']) 11 | -------------------------------------------------------------------------------- /tests/server.conf: -------------------------------------------------------------------------------- 1 | BindAddress = @SERVER_ADDRESS@ 2 | SourceName = @SOURCE_NAME@ 3 | Database = @DB_PATH@ 4 | RegistrationPeriod = 2h 5 | ESIMinInterval = 1m 6 | ESIMinInterval = 5m 7 | Security = @NOT_SET@ 8 | AuthKeyFile = @AUTH_KEY@ 9 | ClientKeyStore = DB: 10 | PIDFile = @MYDIR@/pid 11 | ControlSocket = @MYDIR@/control 12 | -------------------------------------------------------------------------------- /isnsd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=iSNS daemon 3 | Before=iscsi.service iscsid.service 4 | After=syslog.target 5 | DefaultDependencies=no 6 | Conflicts=shutdown.target 7 | 8 | [Service] 9 | Type=simple 10 | ExecStart=/usr/sbin/isnsd -f 11 | LimitCORE=infinity 12 | 13 | [Install] 14 | WantedBy=sysinit.target 15 | Also=isnsd.socket 16 | -------------------------------------------------------------------------------- /internal.h: -------------------------------------------------------------------------------- 1 | /* 2 | * iSNS implementation - internal functions and types 3 | * 4 | * Copyright (C) 2007 Olaf Kirch 5 | */ 6 | 7 | #ifndef ISNS_INTERNAL_H 8 | #define ISNS_INTERNAL_H 9 | 10 | extern char * isns_slp_build_url(uint16_t); 11 | extern int isns_slp_register(const char *); 12 | extern int isns_slp_unregister(const char *); 13 | extern char * isns_slp_find(void); 14 | 15 | #endif /* ISNS_INTERNAL_H */ 16 | 17 | -------------------------------------------------------------------------------- /tests/data/Test02/query4: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0811 uint32 : DD ID = 1 3 | 0812 string : DD name = "isns.dd1" 4 | 081e uint32 : DD features = 5 | 0813 uint32 : DD member iSCSI index = 6 6 | 0814 string : DD member iSCSI name = "isns.client1" 7 | 0813 uint32 : DD member iSCSI index = 10 8 | 0814 string : DD member iSCSI name = "isns.client2" 9 | 0813 uint32 : DD member iSCSI index = 14 10 | 0814 string : DD member iSCSI name = "iqn.com.foobar:disk1" 11 | -------------------------------------------------------------------------------- /tests/data/test02/11-query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0811 uint32 : DD ID = 1 3 | 0812 string : DD name = "isns.dd1" 4 | 081e uint32 : DD features = 5 | 0813 uint32 : DD member iSCSI index = 6 6 | 0814 string : DD member iSCSI name = "isns.client1" 7 | 0813 uint32 : DD member iSCSI index = 10 8 | 0814 string : DD member iSCSI name = "isns.client2" 9 | 0813 uint32 : DD member iSCSI index = 14 10 | 0814 string : DD member iSCSI name = "iqn.com.foobar:disk1" 11 | -------------------------------------------------------------------------------- /tests/data/Test02/query4-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0811 uint32 : DD ID = 1 3 | 0812 string : DD name = "isns.dd1" 4 | 081e uint32 : DD features = 5 | 0813 uint32 : DD member iSCSI index = 2 6 | 0814 string : DD member iSCSI name = "isns.client1" 7 | 0813 uint32 : DD member iSCSI index = 6 8 | 0814 string : DD member iSCSI name = "isns.client2" 9 | 0813 uint32 : DD member iSCSI index = 10 10 | 0814 string : DD member iSCSI name = "iqn.com.foobar:disk1" 11 | -------------------------------------------------------------------------------- /tests/data/test02/09-query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0811 uint32 : DD ID = 1 3 | 0812 string : DD name = "isns.dd1" 4 | 081e uint32 : DD features = 5 | 0813 uint32 : DD member iSCSI index = 2 6 | 0814 string : DD member iSCSI name = "isns.client1" 7 | 0813 uint32 : DD member iSCSI index = 6 8 | 0814 string : DD member iSCSI name = "isns.client2" 9 | 0813 uint32 : DD member iSCSI index = 10 10 | 0814 string : DD member iSCSI name = "iqn.com.foobar:disk1" 11 | -------------------------------------------------------------------------------- /tests/data/test03/99-unregistration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test03/server0/database 3 | Last EID: 1 4 | Last Index: 7 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------------------------------------------------------------------------- /include/libisns/meson.build: -------------------------------------------------------------------------------- 1 | # meson build control file for open-isns public include files 2 | 3 | inc_conf = configuration_data() 4 | inc_conf.set('RUNDIR', get_option('rundir')) 5 | inc_conf.set('VERSION', meson.project_version()) 6 | 7 | static_hdr_files = files([ 8 | 'attrs.h', 9 | 'buffer.h', 10 | 'isns.h', 11 | 'isns-proto.h', 12 | 'message.h', 13 | 'source.h', 14 | 'types.h', 15 | 'util.h']) 16 | 17 | template_hdr_name = 'paths.h' 18 | template_hdr_file = files('paths.h.in') 19 | 20 | configure_file( 21 | input: template_hdr_file, 22 | output: template_hdr_name, 23 | configuration: inc_conf, 24 | install: true, 25 | install_dir: get_option('includedir') / 'libisns') 26 | 27 | install_headers(static_hdr_files, subdir: 'libisns') 28 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | # meson options for open-isns 2 | 3 | # enabled security and service location protocol usage by default 4 | option('security', type: 'feature', value: 'auto', 5 | description: 'enable security using libcrypt') 6 | option('slp', type: 'feature', value: 'auto', 7 | description: 'enable use of Service Location Protocol') 8 | 9 | # use libisns.vers for versioning, when building shared library 10 | option('shared_version', type: 'boolean', value: true, 11 | description: 'use library versioning on the shared library') 12 | 13 | # set default locations for systemd and runtime files 14 | option('systemddir', type: 'string', value: '/usr/lib/systemd', 15 | description: 'override systemd directory "/usr/lib/systemd"') 16 | option('rundir', type: 'string', value: '/var/run', 17 | description: 'override runtime directory "/var/run"') 18 | -------------------------------------------------------------------------------- /include/libisns/paths.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Compile time configuration. 3 | * For now, let's keep it simple and ignore autoconf... 4 | * 5 | * Copyright (C) 2006, 2007 Olaf Kirch 6 | */ 7 | 8 | #ifndef ISNS_CONFIG_H 9 | #define ISNS_CONFIG_H 10 | 11 | #define __OPENISNS_MKVERSION(maj, min) (((maj) << 8) + (min)) 12 | #define OPENISNS_VERSION __OPENISNS_MKVERSION(0, 101); 13 | #define OPENISNS_VERSION_STRING "@VERSION@" 14 | 15 | #define ISNS_ETCDIR "/etc/isns" 16 | #define ISNS_RUNDIR "@RUNDIR@" 17 | #define ISNS_DEFAULT_ISNSD_CONFIG ISNS_ETCDIR "/isnsd.conf" 18 | #define ISNS_DEFAULT_ISNSDD_CONFIG ISNS_ETCDIR "/isnsdd.conf" 19 | #define ISNS_DEFAULT_ISNSADM_CONFIG ISNS_ETCDIR "/isnsadm.conf" 20 | #define ISNS_DEFAULT_LOCAL_REGISTRY ISNS_RUNDIR "/isns.registry" 21 | 22 | #define ISCSI_DEFAULT_INITIATORNAME "/etc/iscsi/initiatorname.iscsi" 23 | 24 | #endif /* ISNS_CONFIG_H */ 25 | -------------------------------------------------------------------------------- /tests/data/Test01/enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test01/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/Test02/enroll1: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test02/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/Test03/enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test03/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/Test04/enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test04/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/Test05/enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test05/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/Test06/enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/Test07/enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test07/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/Test01/deregister: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test01/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/Test03/deregister2: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test03/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/test01/01-enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test01/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/test02/01-enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test02/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/test03/01-enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test03/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/test04/01-enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test04/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/test05/01-enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test05/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/test05/03-expired: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test05/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/test06/01-enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /HACKING: -------------------------------------------------------------------------------- 1 | 2 | When hacking on open-isns, or when trying to locate a problem, 3 | the following information may be useful: 4 | 5 | - You can start the daemon using the -f option, which 6 | prevents it from backgrounding itself. Crucial if 7 | you want to run it in a debugger, or under strace. 8 | 9 | This option works for isnsd and isnsdd 10 | 11 | - All tools support the "-d" option to enable debugging. 12 | In general, you want to use "-d all" to turn on all 13 | debugging options. However, you can select individual 14 | debug facilities - check out the manpages and/or 15 | the source code in logging.c 16 | 17 | - If you want to debug memory issues (crashing, memory leaks, etc), 18 | there is a memory debuging module (mdebug.c), but it doesn't 19 | currently work. So you're on your own. If you figure out 20 | something useful, or you get the current mdebug.c file working, 21 | please update this file. 22 | -------------------------------------------------------------------------------- /tests/data/test01/99-unregistration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test01/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /tests/data/test03/04-unregistration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test03/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------------------------------------------------------------------------- /include/libisns/source.h: -------------------------------------------------------------------------------- 1 | /* 2 | * iSNS source attribute handling 3 | * 4 | * Copyright (C) 2007 Olaf Kirch 5 | */ 6 | 7 | #ifndef ISNS_SOURCE_H 8 | #define ISNS_SOURCE_H 9 | 10 | #include 11 | 12 | struct isns_source { 13 | unsigned int is_users; 14 | isns_attr_t * is_attr; 15 | unsigned int is_untrusted : 1; 16 | 17 | isns_object_t * is_node; 18 | unsigned int is_node_type; 19 | 20 | isns_object_t * is_entity; 21 | }; 22 | 23 | extern int isns_source_encode(buf_t *, const isns_source_t *); 24 | extern int isns_source_decode(buf_t *, isns_source_t **); 25 | extern int isns_source_set_node(isns_source_t *, isns_db_t *); 26 | extern void isns_source_set_entity(isns_source_t *, isns_object_t *); 27 | extern isns_source_t * isns_source_dummy(void); 28 | 29 | extern char * isns_build_source_pattern(const char *); 30 | extern int isns_source_pattern_match(const char *, const char *); 31 | 32 | #endif /* ISNS_SOURCE_H */ 33 | -------------------------------------------------------------------------------- /tests/data/test07/01-enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test07/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | 0004 uint64 : Timestamp = Fri Sep 14 13:42:57 2007 10 | -------------- 11 | Object: index=2 type= state=mature parent=1 PRIVATE 12 | 0601v string : Security Policy Index = "client1.isns-test.eu" 13 | 0607v string : Policy allowed node name = "isns.client1" 14 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 15 | -------------- 16 | Object: index=3 type= state=mature parent=1 PRIVATE 17 | 0020 string : iSCSI name = "isns.control" 18 | 0021 uint32 : iSCSI node type = 19 | 0024 uint32 : iSCSI node index = 3 20 | -------------------------------------------------------------------------------- /tests/data/test07/03-expired: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test07/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | 0004 uint64 : Timestamp = Fri Sep 14 13:42:57 2007 10 | -------------- 11 | Object: index=2 type= state=mature parent=1 PRIVATE 12 | 0601v string : Security Policy Index = "client1.isns-test.eu" 13 | 0607v string : Policy allowed node name = "isns.client1" 14 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 15 | -------------- 16 | Object: index=3 type= state=mature parent=1 PRIVATE 17 | 0020 string : iSCSI name = "isns.control" 18 | 0021 uint32 : iSCSI node type = 19 | 0024 uint32 : iSCSI node index = 3 20 | -------------------------------------------------------------------------------- /tests/data/test07/05-expired: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test07/server0/database 3 | Last EID: 1 4 | Last Index: 14 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | 0004 uint64 : Timestamp = Fri Sep 14 13:43:12 2007 10 | -------------- 11 | Object: index=2 type= state=mature parent=1 PRIVATE 12 | 0601v string : Security Policy Index = "client1.isns-test.eu" 13 | 0607v string : Policy allowed node name = "isns.client1" 14 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 15 | -------------- 16 | Object: index=3 type= state=mature parent=1 PRIVATE 17 | 0020 string : iSCSI name = "isns.control" 18 | 0021 uint32 : iSCSI node type = 19 | 0024 uint32 : iSCSI node index = 3 20 | -------------------------------------------------------------------------------- /tests/data/Test01/query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test-eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Mon Jan 20 09:08:17 2020 6 | 0007 uint32 : Entity index = 4 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 5 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.0.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 6 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.0.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 7 21 | -------------------------------------------------------------------------------- /tests/data/Test02/query1-1: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Wed Jan 22 19:29:13 2020 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | -------------------------------------------------------------------------------- /tests/data/Test02/query1-2: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client2.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Wed Jan 22 19:29:16 2020 6 | 0007 uint32 : Entity index = 9 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client2" 9 | 0021 uint32 : iSCSI node type = Target 10 | 0024 uint32 : iSCSI node index = 10 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.2 13 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 14 | 0016 uint32 : Portal index = 11 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client2" 17 | 0031 ipaddr : Portal group address = 127.1.0.2 18 | 0032 uint32 : Portal group port = 3260/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 12 21 | -------------------------------------------------------------------------------- /tests/data/test01/03-query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Sep 14 12:41:41 2007 6 | 0007 uint32 : Entity index = 4 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 5 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.0.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 6 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.0.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 7 21 | -------------------------------------------------------------------------------- /tests/data/test02/04-query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Sep 14 13:18:54 2007 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | -------------------------------------------------------------------------------- /tests/data/test02/05-query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client2.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Sep 14 13:18:54 2007 6 | 0007 uint32 : Entity index = 9 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client2" 9 | 0021 uint32 : iSCSI node type = Target 10 | 0024 uint32 : iSCSI node index = 10 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.2 13 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 14 | 0016 uint32 : Portal index = 11 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client2" 17 | 0031 ipaddr : Portal group address = 127.1.0.2 18 | 0032 uint32 : Portal group port = 3260/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 12 21 | -------------------------------------------------------------------------------- /tests/data/test02/09-query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client2.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Sep 14 13:18:54 2007 6 | 0007 uint32 : Entity index = 9 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client2" 9 | 0021 uint32 : iSCSI node type = Target 10 | 0024 uint32 : iSCSI node index = 10 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.2 13 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 14 | 0016 uint32 : Portal index = 11 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client2" 17 | 0031 ipaddr : Portal group address = 127.1.0.2 18 | 0032 uint32 : Portal group port = 3260/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 12 21 | -------------------------------------------------------------------------------- /tests/data/test04/04-query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Sep 14 13:38:42 2007 6 | 0007 uint32 : Entity index = 4 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 5 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.0.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 6 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.0.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 7 21 | -------------------------------------------------------------------------------- /tests/data/Test01/query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Sun Jan 19 15:56:08 2020 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.0.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.0.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | -------------------------------------------------------------------------------- /tests/data/Test02/query1-2-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0002" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Tue Jan 21 16:07:17 2020 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client2" 9 | 0021 uint32 : iSCSI node type = Target 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.2 13 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client2" 17 | 0031 ipaddr : Portal group address = 127.1.0.2 18 | 0032 uint32 : Portal group port = 3260/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | -------------------------------------------------------------------------------- /tests/data/test02/03-query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0002" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Nov 17 12:12:43 2017 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client2" 9 | 0021 uint32 : iSCSI node type = Target 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.2 13 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client2" 17 | 0031 ipaddr : Portal group address = 127.1.0.2 18 | 0032 uint32 : Portal group port = 3260/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | -------------------------------------------------------------------------------- /tests/data/test02/07-query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0002" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Nov 17 17:25:18 2017 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client2" 9 | 0021 uint32 : iSCSI node type = Target 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.2 13 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client2" 17 | 0031 ipaddr : Portal group address = 127.1.0.2 18 | 0032 uint32 : Portal group port = 3260/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | -------------------------------------------------------------------------------- /tests/data/Test02/query1-1-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Tue Jan 21 17:04:56 2020 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | -------------------------------------------------------------------------------- /tests/data/test01/02-query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Nov 17 11:28:30 2017 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.0.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.0.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | -------------------------------------------------------------------------------- /tests/data/test02/02-query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Nov 17 12:12:43 2017 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | -------------------------------------------------------------------------------- /tests/data/test04/03-query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Nov 17 17:42:33 2017 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.0.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.0.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | -------------------------------------------------------------------------------- /tests/data/Test06/deregister-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 2 4 | Last Index: 17 5 | -------------- 6 | Object: index=10 type= state=limbo 7 | 0020 string : iSCSI name = "isns.client1" 8 | 0024 uint32 : iSCSI node index = 10 9 | -------------- 10 | Object: index=13 type= state=mature 11 | 0811 uint32 : DD ID = 1 12 | 0812 string : DD name = "isns.dd1" 13 | 081e uint32 : DD features = 14 | 0813 uint32 : DD member iSCSI index = 10 15 | 0814 string : DD member iSCSI name = "isns.client1" 16 | 0816 uint32 : DD member portal index = 15 17 | 0817 ipaddr : DD member portal addr = 192.168.1.1 18 | 0818 uint32 : DD member portal port = 860/tcp 19 | -------------- 20 | Object: index=15 type= state=limbo 21 | 0010 ipaddr : Portal IP address = 192.168.1.1 22 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 23 | 0016 uint32 : Portal index = 15 24 | -------------------------------------------------------------------------------- /tests/data/test06/09-unregistration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 2 4 | Last Index: 19 5 | -------------- 6 | Object: index=10 type= state=limbo 7 | 0020 string : iSCSI name = "isns.client1" 8 | 0024 uint32 : iSCSI node index = 10 9 | -------------- 10 | Object: index=13 type= state=mature 11 | 0811 uint32 : DD ID = 1 12 | 0812 string : DD name = "isns.dd1" 13 | 081e uint32 : DD features = 14 | 0813 uint32 : DD member iSCSI index = 10 15 | 0814 string : DD member iSCSI name = "isns.client1" 16 | 0816 uint32 : DD member portal index = 15 17 | 0817 ipaddr : DD member portal addr = 192.168.1.1 18 | 0818 uint32 : DD member portal port = 860/tcp 19 | -------------- 20 | Object: index=15 type= state=limbo 21 | 0010 ipaddr : Portal IP address = 192.168.1.1 22 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 23 | 0016 uint32 : Portal index = 15 24 | -------------------------------------------------------------------------------- /tests/data/test01/03-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test01/server0/database 3 | Last EID: 1 4 | Last Index: 4 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "isns.client1" 12 | 0602v string : Policy allowed source name = "isns.client1" 13 | 0607v string : Policy allowed node name = "isns.client1" 14 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 15 | -------------- 16 | Object: index=3 type= state=mature parent=1 PRIVATE 17 | 0601v string : Security Policy Index = "isns.client2" 18 | 0602v string : Policy allowed source name = "isns.client2" 19 | 0607v string : Policy allowed node name = "isns.client2" 20 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 21 | -------------------------------------------------------------------------------- /vendor.c: -------------------------------------------------------------------------------- 1 | /* 2 | * iSNS vendor specific objects 3 | * 4 | * Copyright (C) 2007 Olaf Kirch 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include "objects.h" 11 | #include 12 | #include "vendor.h" 13 | #include 14 | 15 | static uint32_t policy_attrs[] = { 16 | OPENISNS_TAG_POLICY_SPI, 17 | OPENISNS_TAG_POLICY_KEY, 18 | OPENISNS_TAG_POLICY_ENTITY, 19 | OPENISNS_TAG_POLICY_OBJECT_TYPE, 20 | OPENISNS_TAG_POLICY_NODE_NAME, 21 | OPENISNS_TAG_POLICY_NODE_TYPE, 22 | OPENISNS_TAG_POLICY_FUNCTIONS, 23 | OPENISNS_TAG_POLICY_VISIBLE_DD, 24 | OPENISNS_TAG_POLICY_DEFAULT_DD, 25 | }; 26 | 27 | static uint32_t policy_key_attrs[] = { 28 | OPENISNS_TAG_POLICY_SPI, 29 | }; 30 | 31 | isns_object_template_t isns_policy_template = { 32 | .iot_name = "Policy", 33 | .iot_handle = ISNS_OBJECT_TYPE_POLICY, 34 | .iot_attrs = policy_attrs, 35 | .iot_num_attrs = array_num_elements(policy_attrs), 36 | .iot_keys = policy_key_attrs, 37 | .iot_num_keys = array_num_elements(policy_key_attrs), 38 | .iot_container = &isns_entity_template, 39 | .iot_vendor_specific = 1, 40 | }; 41 | 42 | -------------------------------------------------------------------------------- /tests/data/Test02/enroll2: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test02/server0/database 3 | Last EID: 1 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature parent=1 PRIVATE 21 | 0601v string : Security Policy Index = "client2.isns-test.eu" 22 | 0607v string : Policy allowed node name = "isns.client2" 23 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 24 | 0608v uint32 : Policy allowed node type = Target 25 | -------------------------------------------------------------------------------- /tests/data/test02/02-enroll: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test02/server0/database 3 | Last EID: 1 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature parent=1 PRIVATE 21 | 0601v string : Security Policy Index = "client2.isns-test.eu" 22 | 0607v string : Policy allowed node name = "isns.client2" 23 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 24 | 0608v uint32 : Policy allowed node type = Target 25 | -------------------------------------------------------------------------------- /tests/data/Test03/deregister1-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test03/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 19:02:24 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=limbo 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test04/restart-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test04/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 10:40:13 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test05/expired-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test05/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 11:42:44 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/test03/02-unregistration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test03/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:55:34 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=limbo 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test01/registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test01/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Sat Jan 18 19:16:17 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test02/registration1-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test02/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Mon Jan 20 10:52:18 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.1.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.1.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test03/registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test03/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 09:43:48 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test04/registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test04/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 10:39:29 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test05/registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test05/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 11:41:00 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test06/registration1-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 16:38:15 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/test04/02-restart-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test04/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:42:31 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/test05/01-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test05/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 20 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:44:57 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/Test06/registration2-1-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 2 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 16:43:54 2020 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 6 17 | -------------- 18 | Object: index=7 type= state=mature parent=5 19 | 0010 ipaddr : Portal IP address = 192.168.1.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 7 22 | -------------- 23 | Object: index=8 type= state=mature parent=5 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 192.168.1.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 8 29 | -------------------------------------------------------------------------------- /tests/data/test01/01-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test01/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 11:28:30 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/test03/01-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test03/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:32:57 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/test04/01-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test04/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:42:31 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/test06/01-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:05 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 3 22 | -------------- 23 | Object: index=4 type= state=mature parent=1 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 127.0.0.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 4 29 | -------------------------------------------------------------------------------- /tests/data/test06/02-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 2 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:05 2017 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 6 17 | -------------- 18 | Object: index=7 type= state=mature parent=5 19 | 0010 ipaddr : Portal IP address = 192.168.1.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 7 22 | -------------- 23 | Object: index=8 type= state=mature parent=5 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 192.168.1.1 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 8 29 | -------------------------------------------------------------------------------- /tests/data/Test06/registration2-2-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 2 4 | Last Index: 13 5 | -------------- 6 | Object: index=9 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 16:43:54 2020 11 | 0007 uint32 : Entity index = 9 12 | -------------- 13 | Object: index=10 type= state=mature parent=9 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 10 17 | -------------- 18 | Object: index=11 type= state=mature parent=9 19 | 0010 ipaddr : Portal IP address = 192.168.1.2 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 11 22 | -------------- 23 | Object: index=12 type= state=mature parent=9 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 192.168.1.2 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 12 29 | -------------------------------------------------------------------------------- /tests/data/test06/03-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 2 4 | Last Index: 13 5 | -------------- 6 | Object: index=9 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:05 2017 11 | 0007 uint32 : Entity index = 9 12 | -------------- 13 | Object: index=10 type= state=mature parent=9 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 10 17 | -------------- 18 | Object: index=11 type= state=mature parent=9 19 | 0010 ipaddr : Portal IP address = 192.168.1.2 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 11 22 | -------------- 23 | Object: index=12 type= state=mature parent=9 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 192.168.1.2 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 12 29 | -------------------------------------------------------------------------------- /etc/openisns.init: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Init script for Open-iSNS. 4 | # 5 | # Copyright (C) 2007 Albert Pauw 6 | # 7 | # chkconfig: 345 13 89 8 | # description: Starts and stops the iSCSI isns server 9 | # 10 | # processname: isnsd 11 | # pidfile: /var/run/isnsd.pid 12 | # config: /etc/isns/isnsd.conf 13 | 14 | # Source function library. 15 | . /etc/init.d/functions 16 | 17 | PATH=/sbin:/bin:/usr/sbin:/usr/bin 18 | #OPTIONS="-4 -d all" 19 | CONFIG="-c /etc/isns/isnsd.conf" 20 | RETVAL=0 21 | 22 | start() 23 | { 24 | echo -n "Starting iSCSI isns service: " 25 | daemon isnsd $OPTIONS $CONFIG 26 | RETVAL=$? 27 | success 28 | echo 29 | [ $RETVAL -eq 0 ] || return 30 | touch /var/lock/subsys/open-isns 31 | } 32 | 33 | stop() 34 | { 35 | echo -n "Stopping iSCSI isns service: " 36 | killproc isnsd 37 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/open-isns 38 | success 39 | echo 40 | 41 | } 42 | 43 | restart() 44 | { 45 | stop 46 | start 47 | } 48 | 49 | case "$1" in 50 | start) 51 | start 52 | ;; 53 | stop) 54 | stop 55 | ;; 56 | restart) 57 | restart 58 | ;; 59 | status) 60 | status isnsd 61 | RETVAL=$? 62 | ;; 63 | condrestart) 64 | [ -f /var/lock/subsys/open-isns ] && restart 65 | ;; 66 | *) 67 | echo $"Usage: $0 {start|stop|restart|status|condrestart}" 68 | exit 1 69 | esac 70 | 71 | exit $RETVAL 72 | -------------------------------------------------------------------------------- /tests/data/Test07/expired1-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test07/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Thu Jan 23 08:49:46 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0014 uint32 : ESI port = 65535/tcp 22 | 0013 uint32 : ESI interval = 300 23 | 0016 uint32 : Portal index = 3 24 | -------------- 25 | Object: index=4 type= state=mature parent=1 26 | 0030 string : Portal group name = "isns.client1" 27 | 0031 ipaddr : Portal group address = 127.0.0.1 28 | 0032 uint32 : Portal group port = 860/tcp 29 | 0033 uint32 : Portal group tag = 1 30 | 0034 uint32 : Portal group index = 4 31 | -------------------------------------------------------------------------------- /tests/data/Test07/registration1-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test07/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Thu Jan 23 08:49:28 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0014 uint32 : ESI port = 65535/tcp 22 | 0013 uint32 : ESI interval = 300 23 | 0016 uint32 : Portal index = 3 24 | -------------- 25 | Object: index=4 type= state=mature parent=1 26 | 0030 string : Portal group name = "isns.client1" 27 | 0031 ipaddr : Portal group address = 127.0.0.1 28 | 0032 uint32 : Portal group port = 860/tcp 29 | 0033 uint32 : Portal group tag = 1 30 | 0034 uint32 : Portal group index = 4 31 | -------------------------------------------------------------------------------- /tests/data/test07/01-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test07/server0/database 3 | Last EID: 2 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:42 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0014 uint32 : ESI port = 65535/tcp 22 | 0013 uint32 : ESI interval = 5 23 | 0016 uint32 : Portal index = 3 24 | -------------- 25 | Object: index=4 type= state=mature parent=1 26 | 0030 string : Portal group name = "isns.client1" 27 | 0031 ipaddr : Portal group address = 127.0.0.1 28 | 0032 uint32 : Portal group port = 860/tcp 29 | 0033 uint32 : Portal group tag = 1 30 | 0034 uint32 : Portal group index = 4 31 | -------------------------------------------------------------------------------- /isnssetup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # isnssetup - bootstrap open-isns server 4 | # 5 | # Copyright (C) 2007 Olaf Kirch 6 | # 7 | # This is a very simple script to bootstrap an iSNS server. 8 | # It creates the necessary keys, enrolls a control node, 9 | # and enrolls the local host as target and initiator. 10 | 11 | hostname=`hostname -f` 12 | 13 | if [ -f isnsd -a -d isnsadm ]; then 14 | PATH=.:$PATH 15 | fi 16 | 17 | # Massage the configuration file 18 | for f in isnsadm.conf isnsdd.conf; do 19 | etcfile=/etc/isns/$f 20 | sed -e 's/^#*\(ServerAddress[[:space:]]*=\).*/\1 localhost/' \ 21 | -e 's/^#*\(Security[[:space:]]*=\).*/\1 1/' \ 22 | $etcfile > $etcfile.tmp 23 | mv $etcfile.tmp $etcfile 24 | done 25 | 26 | echo "*** Initializing server security ***" 27 | isnsd --init 28 | cp /etc/isns/auth_key.pub /etc/isns/server_key.pub 29 | 30 | if ps ax|grep isnsd | grep -qv grep; then 31 | killall -TERM isnsd 32 | sleep 1 33 | fi 34 | isnsd 35 | sleep 1 36 | 37 | echo "*** Registering control node policy ***" 38 | rm -f /etc/isns/control.key 39 | isnsadm --local \ 40 | --keyfile=/etc/isns/control.key \ 41 | --enroll isns.control \ 42 | node-type=ALL functions=ALL object-type=ALL 43 | 44 | echo "*** Registering control node ***" 45 | isnsadm --local \ 46 | --register control 47 | 48 | echo "*** Registering policy for server ***" 49 | isnsadm --control \ 50 | --enroll $hostname \ 51 | key=/etc/isns/auth_key.pub \ 52 | node-type=target+initiator 53 | -------------------------------------------------------------------------------- /tests/data/Test09/pauw2-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test09/server0/database 3 | Last EID: 1 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "blue.pauw.homeunix.net" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Thu Jan 23 09:27:48 2020 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0010 ipaddr : Portal IP address = 192.168.1.2 15 | 0011 uint32 : Portal TCP/UDP port = 33849/tcp 16 | 0014 uint32 : ESI port = 56288/tcp 17 | 0013 uint32 : ESI interval = 300 18 | 0016 uint32 : Portal index = 6 19 | -------------- 20 | Object: index=7 type= state=mature parent=5 21 | 0020 string : iSCSI name = "iqn.2005-03.org.open-iscsi:blue" 22 | 0021 uint32 : iSCSI node type = Initiator 23 | 0022 string : iSCSI alias = "blue.pauw.homeunix.net" 24 | 0024 uint32 : iSCSI node index = 7 25 | -------------- 26 | Object: index=8 type= state=mature parent=5 27 | 0030 string : Portal group name = "iqn.2005-03.org.open-iscsi:blue" 28 | 0031 ipaddr : Portal group address = 192.168.1.2 29 | 0032 uint32 : Portal group port = 33849/tcp 30 | 0033 uint32 : Portal group tag = 1 31 | 0034 uint32 : Portal group index = 8 32 | -------------------------------------------------------------------------------- /tests/data/Test10/expired1-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test10/server0/database 3 | Last EID: 1 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "blue.pauw.homeunix.net" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Thu Jan 23 10:50:03 2020 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0010 ipaddr : Portal IP address = 192.168.1.2 15 | 0011 uint32 : Portal TCP/UDP port = 33849/tcp 16 | 0014 uint32 : ESI port = 56288/tcp 17 | 0013 uint32 : ESI interval = 10 18 | 0016 uint32 : Portal index = 6 19 | -------------- 20 | Object: index=7 type= state=mature parent=5 21 | 0020 string : iSCSI name = "iqn.2005-03.org.open-iscsi:blue" 22 | 0021 uint32 : iSCSI node type = Initiator 23 | 0022 string : iSCSI alias = "blue.pauw.homeunix.net" 24 | 0024 uint32 : iSCSI node index = 7 25 | -------------- 26 | Object: index=8 type= state=mature parent=5 27 | 0030 string : Portal group name = "iqn.2005-03.org.open-iscsi:blue" 28 | 0031 ipaddr : Portal group address = 192.168.1.2 29 | 0032 uint32 : Portal group port = 33849/tcp 30 | 0033 uint32 : Portal group tag = 1 31 | 0034 uint32 : Portal group index = 8 32 | -------------------------------------------------------------------------------- /tests/data/Test10/expired2-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test10/server0/database 3 | Last EID: 1 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "blue.pauw.homeunix.net" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Thu Jan 23 10:51:59 2020 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0010 ipaddr : Portal IP address = 192.168.1.2 15 | 0011 uint32 : Portal TCP/UDP port = 33849/tcp 16 | 0014 uint32 : ESI port = 56288/tcp 17 | 0013 uint32 : ESI interval = 10 18 | 0016 uint32 : Portal index = 6 19 | -------------- 20 | Object: index=7 type= state=mature parent=5 21 | 0020 string : iSCSI name = "iqn.2005-03.org.open-iscsi:blue" 22 | 0021 uint32 : iSCSI node type = Initiator 23 | 0022 string : iSCSI alias = "blue.pauw.homeunix.net" 24 | 0024 uint32 : iSCSI node index = 7 25 | -------------- 26 | Object: index=8 type= state=mature parent=5 27 | 0030 string : Portal group name = "iqn.2005-03.org.open-iscsi:blue" 28 | 0031 ipaddr : Portal group address = 192.168.1.2 29 | 0032 uint32 : Portal group port = 33849/tcp 30 | 0033 uint32 : Portal group tag = 1 31 | 0034 uint32 : Portal group index = 8 32 | -------------------------------------------------------------------------------- /tests/data/test10/01-pauw3-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test10/server0/database 3 | Last EID: 1 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "blue.pauw.homeunix.net" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 18:00:56 2017 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0010 ipaddr : Portal IP address = 192.168.1.2 15 | 0011 uint32 : Portal TCP/UDP port = 33849/tcp 16 | 0014 uint32 : ESI port = 56288/tcp 17 | 0013 uint32 : ESI interval = 10 18 | 0016 uint32 : Portal index = 6 19 | -------------- 20 | Object: index=7 type= state=mature parent=5 21 | 0020 string : iSCSI name = "iqn.2005-03.org.open-iscsi:blue" 22 | 0021 uint32 : iSCSI node type = Initiator 23 | 0022 string : iSCSI alias = "blue.pauw.homeunix.net" 24 | 0024 uint32 : iSCSI node index = 7 25 | -------------- 26 | Object: index=8 type= state=mature parent=5 27 | 0030 string : Portal group name = "iqn.2005-03.org.open-iscsi:blue" 28 | 0031 ipaddr : Portal group address = 192.168.1.2 29 | 0032 uint32 : Portal group port = 33849/tcp 30 | 0033 uint32 : Portal group tag = 1 31 | 0034 uint32 : Portal group index = 8 32 | -------------------------------------------------------------------------------- /tests/data/test10/03-pauw3-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test10/server0/database 3 | Last EID: 1 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "blue.pauw.homeunix.net" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 18:01:17 2017 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0010 ipaddr : Portal IP address = 192.168.1.2 15 | 0011 uint32 : Portal TCP/UDP port = 33849/tcp 16 | 0014 uint32 : ESI port = 56288/tcp 17 | 0013 uint32 : ESI interval = 10 18 | 0016 uint32 : Portal index = 6 19 | -------------- 20 | Object: index=7 type= state=mature parent=5 21 | 0020 string : iSCSI name = "iqn.2005-03.org.open-iscsi:blue" 22 | 0021 uint32 : iSCSI node type = Initiator 23 | 0022 string : iSCSI alias = "blue.pauw.homeunix.net" 24 | 0024 uint32 : iSCSI node index = 7 25 | -------------- 26 | Object: index=8 type= state=mature parent=5 27 | 0030 string : Portal group name = "iqn.2005-03.org.open-iscsi:blue" 28 | 0031 ipaddr : Portal group address = 192.168.1.2 29 | 0032 uint32 : Portal group port = 33849/tcp 30 | 0033 uint32 : Portal group tag = 1 31 | 0034 uint32 : Portal group index = 8 32 | -------------------------------------------------------------------------------- /tests/data/test09/01-pauw2-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test09/server0/database 3 | Last EID: 1 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "blue.pauw.homeunix.net" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 18:00:32 2017 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0010 ipaddr : Portal IP address = 192.168.1.2 15 | 0011 uint32 : Portal TCP/UDP port = 33849/tcp 16 | 0014 uint32 : ESI port = 56288/tcp 17 | 0013 uint32 : ESI interval = 300 18 | 0016 uint32 : Portal index = 6 19 | -------------- 20 | Object: index=7 type= state=mature parent=5 21 | 0020 string : iSCSI name = "iqn.2005-03.org.open-iscsi:blue" 22 | 0021 uint32 : iSCSI node type = Initiator 23 | 0022 string : iSCSI alias = "blue.pauw.homeunix.net" 24 | 0024 uint32 : iSCSI node index = 7 25 | -------------- 26 | Object: index=8 type= state=mature parent=5 27 | 0030 string : Portal group name = "iqn.2005-03.org.open-iscsi:blue" 28 | 0031 ipaddr : Portal group address = 192.168.1.2 29 | 0032 uint32 : Portal group port = 33849/tcp 30 | 0033 uint32 : Portal group tag = 1 31 | 0034 uint32 : Portal group index = 8 32 | -------------------------------------------------------------------------------- /tests/data/test10/02-expired-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test10/server0/database 3 | Last EID: 1 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "blue.pauw.homeunix.net" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 18:00:56 2017 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0010 ipaddr : Portal IP address = 192.168.1.2 15 | 0011 uint32 : Portal TCP/UDP port = 33849/tcp 16 | 0014 uint32 : ESI port = 56288/tcp 17 | 0013 uint32 : ESI interval = 10 18 | 0016 uint32 : Portal index = 6 19 | -------------- 20 | Object: index=7 type= state=mature parent=5 21 | 0020 string : iSCSI name = "iqn.2005-03.org.open-iscsi:blue" 22 | 0021 uint32 : iSCSI node type = Initiator 23 | 0022 string : iSCSI alias = "blue.pauw.homeunix.net" 24 | 0024 uint32 : iSCSI node index = 7 25 | -------------- 26 | Object: index=8 type= state=mature parent=5 27 | 0030 string : Portal group name = "iqn.2005-03.org.open-iscsi:blue" 28 | 0031 ipaddr : Portal group address = 192.168.1.2 29 | 0032 uint32 : Portal group port = 33849/tcp 30 | 0033 uint32 : Portal group tag = 1 31 | 0034 uint32 : Portal group index = 8 32 | -------------------------------------------------------------------------------- /tests/data/test10/04-expired-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test10/server0/database 3 | Last EID: 1 4 | Last Index: 9 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "blue.pauw.homeunix.net" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 18:01:17 2017 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0010 ipaddr : Portal IP address = 192.168.1.2 15 | 0011 uint32 : Portal TCP/UDP port = 33849/tcp 16 | 0014 uint32 : ESI port = 56288/tcp 17 | 0013 uint32 : ESI interval = 10 18 | 0016 uint32 : Portal index = 6 19 | -------------- 20 | Object: index=7 type= state=mature parent=5 21 | 0020 string : iSCSI name = "iqn.2005-03.org.open-iscsi:blue" 22 | 0021 uint32 : iSCSI node type = Initiator 23 | 0022 string : iSCSI alias = "blue.pauw.homeunix.net" 24 | 0024 uint32 : iSCSI node index = 7 25 | -------------- 26 | Object: index=8 type= state=mature parent=5 27 | 0030 string : Portal group name = "iqn.2005-03.org.open-iscsi:blue" 28 | 0031 ipaddr : Portal group address = 192.168.1.2 29 | 0032 uint32 : Portal group port = 33849/tcp 30 | 0033 uint32 : Portal group tag = 1 31 | 0034 uint32 : Portal group index = 8 32 | -------------------------------------------------------------------------------- /tests/data/Test11/pauw2-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test11/server0/database 3 | Last EID: 1 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "troopa.nki.nl" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Thu Jan 23 11:09:07 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0010 ipaddr : Portal IP address = 192.168.1.40 15 | 0011 uint32 : Portal TCP/UDP port = 3229/tcp 16 | 0017 uint32 : SCN port = 3230/tcp 17 | 0014 uint32 : ESI port = 3230/tcp 18 | 0013 uint32 : ESI interval = 300 19 | 0016 uint32 : Portal index = 2 20 | -------------- 21 | Object: index=3 type= state=mature parent=1 22 | 0030 string : Portal group name = "iqn.1991-05.com.microsoft:orange" 23 | 0031 ipaddr : Portal group address = 192.168.1.40 24 | 0032 uint32 : Portal group port = 3229/tcp 25 | 0033 uint32 : Portal group tag = 1 26 | 0034 uint32 : Portal group index = 3 27 | -------------- 28 | Object: index=4 type= state=mature parent=1 29 | 0020 string : iSCSI name = "iqn.1991-05.com.microsoft:orange" 30 | 0021 uint32 : iSCSI node type = Initiator 31 | 0022 string : iSCSI alias = "" 32 | 0024 uint32 : iSCSI node index = 4 33 | -------------------------------------------------------------------------------- /tests/data/test11/01-pauw4-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test11/server0/database 3 | Last EID: 1 4 | Last Index: 5 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "troopa.nki.nl" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 18:03:04 2017 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0010 ipaddr : Portal IP address = 192.168.1.40 15 | 0011 uint32 : Portal TCP/UDP port = 3229/tcp 16 | 0017 uint32 : SCN port = 3230/tcp 17 | 0014 uint32 : ESI port = 3230/tcp 18 | 0013 uint32 : ESI interval = 300 19 | 0016 uint32 : Portal index = 2 20 | -------------- 21 | Object: index=3 type= state=mature parent=1 22 | 0030 string : Portal group name = "iqn.1991-05.com.microsoft:orange" 23 | 0031 ipaddr : Portal group address = 192.168.1.40 24 | 0032 uint32 : Portal group port = 3229/tcp 25 | 0033 uint32 : Portal group tag = 1 26 | 0034 uint32 : Portal group index = 3 27 | -------------- 28 | Object: index=4 type= state=mature parent=1 29 | 0020 string : iSCSI name = "iqn.1991-05.com.microsoft:orange" 30 | 0021 uint32 : iSCSI node type = Initiator 31 | 0022 string : iSCSI alias = "" 32 | 0024 uint32 : iSCSI node index = 4 33 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: c 2 | compiler: gcc 3 | os: linux 4 | dist: bionic 5 | env: 6 | global: 7 | # This is an excrypted setting of COVERITY_SCAN_TOKEN= 8 | # Travis-CI has the private key to decrypt this and set the environment 9 | # variable with the token needed for Coverity API access 10 | secure: cX4eO7dUEYxUSnC/aZ7wWv5Y6ljKI/Bu5yEtW9/vxiEjqO4PcvcCTEno4XfDqZ7gG/eSAAI26//mintRUO/ugcpql4aEf5BmPND/wWPXtGeypAeDMIc9X+pv4txsUIMDSXHZYNj6Bn654h/HOvWqwhqSk0pWEtt4lwjNM2vIUi/d72QUZl5kgv9bVKwb0aO9uHYzC+9uTy9vSoJFIghI91KmSo2WEVk8ZNd3tB1+GMGBIYred16OtDee8NEmn1ESDeyxamWvLq/7nsqo+8v9I8X72acjMDU+oDt0zwz+78GpM3lbe/MKmmsqCRbFXMxH4zqdgg5o++WnFwDbvtZTjpozSa8MVGi5A8eGME12VO1bYGXxeUdSPbUMo0RjevDqGZX9V7q7SLeDOd4GQHLYs/t3qcYuPmTMHJEpMF37LKBXPvMnnROoCUYupA93FT9PWhikA1onSXE9sJQUB2bYsCbZgiPDgd0mf6LUej9geY/6FkjGofuavYrGggSoObxYd6OkGKQoflDz7wA910o+FXKLhcZr0pmXrY/FHGntNdRRY+yTbuUurRBmrsX91z+qnlisAmrHk86kXy7z3CkbPkKN1rYNKMgXnko6H3ucj4GsqgPYEKvspgOWQYeAfZLd/CnUlWQUVlsKBs770jyYIQTFfmNdYKg5i9Sh8HkCjaA= 11 | addons: 12 | apt: 13 | update: true 14 | packages: 15 | - openssl 16 | - libssl-dev 17 | coverity_scan: 18 | project: 19 | name: open-iscsi/open-isns 20 | notification_email: LDuncan@suse.com 21 | build_command_prepend: "(DEB_CFLAGS_APPEND=-Wno-error dpkg-buildflags --export=sh) > env.sh && source env.sh && ./configure --with-security" 22 | build_command: "make" 23 | branch_pattern: coverity_scan 24 | script: 25 | - | 26 | if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then 27 | (eval $(DEB_CFLAGS_APPEND=-Wno-error dpkg-buildflags --export=sh) && ./configure --with-security) 28 | make 29 | fi 30 | -------------------------------------------------------------------------------- /doc/isnssetup.8: -------------------------------------------------------------------------------- 1 | '\" t 2 | .TH ISNSSETUP 8 "4 Dec 2020" 3 | .SH NAME 4 | isnssetup \- a simple script to bootstrap an iSNS server, including security 5 | .SH SYNOPSIS 6 | .B isnssetup 7 | .SH DESCRIPTION 8 | .B isnssetup 9 | is a command line utility for for bootstrapping your iSNS 10 | installation. It sets up the authentication credentials, 11 | sets up the 12 | .B ServerAddress 13 | to be 14 | .IR localhost , 15 | and registers the appropriate values in the 16 | .B iSNS 17 | database. The 18 | .B isnssetup 19 | script does not take any options. 20 | .PP 21 | Running this script performs the following steps: 22 | .TP 23 | .B \(bu 24 | Set 25 | .B ServerAddress 26 | to 27 | .I localhost 28 | and 29 | .B Security 30 | to 31 | .I 1 32 | for 33 | .B isnsadmin.conf 34 | and 35 | .BR isnsdd.conf . 36 | .TP 37 | .B \(bu 38 | Initialize security files by running 39 | .BR "isnsd --init" , 40 | copying the public key to the server key, then restarting 41 | the 42 | .B isnsd 43 | daemon, so that it sees the new authorization files. 44 | .TP 45 | .B \(bu 46 | Registering the control node policy, the control node itself, and 47 | lastly registering the server policy. 48 | .PP 49 | Note that this script is supplied as an example, although you should 50 | be able to use it directly if you wish. You have to be 51 | .B root 52 | to run this script successfully. 53 | .SH BUGS 54 | This script does not take 55 | .B systemd 56 | into account, so you may have to modify it to get it to work on 57 | a modern system. 58 | .SH SEE ALSO 59 | RFC 4171, 60 | .BR isnsadm (8), 61 | .BR isnsd (8), 62 | .BR isns_config (5). 63 | .SH AUTHORS 64 | Olaf Kirch 65 | -------------------------------------------------------------------------------- /vendor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * iSNS "vendor-specific" protocol definitions 3 | * 4 | * Copyright (C) 2007 Olaf Kirch 5 | */ 6 | 7 | #ifndef ISNS_VENDOR_H 8 | #define ISNS_VENDOR_H 9 | 10 | #include 11 | 12 | /* 13 | * We're poor, we don't own a OUI. Let's fake one. 14 | */ 15 | #define OPENISNS_VENDOR_OUI 0xFFFF00 16 | #define OPENISNS_VENDOR_PREFIX (OPENISNS_VENDOR_OUI << 8) 17 | #define OPENISNS_IS_PRIVATE_ATTR(tag) (((tag) >> 16) == 0xFFFF) 18 | 19 | enum openisns_vendor_tag { 20 | /* Security Policy Identifier */ 21 | OPENISNS_TAG_POLICY_SPI = OPENISNS_VENDOR_PREFIX + ISNS_VENDOR_SPECIFIC_OTHER_BASE, 22 | 23 | __OPENISNS_TAG_POLICY_RESERVED, 24 | 25 | /* DSA signature key (public) */ 26 | OPENISNS_TAG_POLICY_KEY, 27 | 28 | /* Entity name to use */ 29 | OPENISNS_TAG_POLICY_ENTITY, 30 | 31 | /* Functions the client is permitted to invoke */ 32 | OPENISNS_TAG_POLICY_FUNCTIONS, 33 | 34 | /* Object types the client is permitted to see. */ 35 | OPENISNS_TAG_POLICY_OBJECT_TYPE, 36 | 37 | /* iSCSI node name the client is permitted to register. 38 | * This attribute may occur multiple times. 39 | * If absent, it defaults to POLICY_SOURCE_NAME 40 | */ 41 | OPENISNS_TAG_POLICY_NODE_NAME, 42 | 43 | /* Node type bitmap the client is permitted to register */ 44 | OPENISNS_TAG_POLICY_NODE_TYPE, 45 | 46 | /* Default discovery domain the client will be 47 | * placed in. 48 | * Not used yet. 49 | */ 50 | OPENISNS_TAG_POLICY_DEFAULT_DD, 51 | OPENISNS_TAG_POLICY_VISIBLE_DD, 52 | }; 53 | 54 | extern const struct isns_object_template isns_policy_template; 55 | 56 | #endif /* ISNS_VENDOR_H */ 57 | -------------------------------------------------------------------------------- /tests/data/Test06/dd-registration1-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 2 4 | Last Index: 14 5 | -------------- 6 | Object: index=9 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Wed Jan 22 16:45:40 2020 11 | 0007 uint32 : Entity index = 9 12 | -------------- 13 | Object: index=10 type= state=mature parent=9 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 10 17 | -------------- 18 | Object: index=11 type= state=mature parent=9 19 | 0010 ipaddr : Portal IP address = 192.168.1.2 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 11 22 | -------------- 23 | Object: index=12 type= state=mature parent=9 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 192.168.1.2 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 12 29 | -------------- 30 | Object: index=13 type= state=mature 31 | 0811 uint32 : DD ID = 1 32 | 0812 string : DD name = "isns.dd1" 33 | 081e uint32 : DD features = 34 | 0813 uint32 : DD member iSCSI index = 10 35 | 0814 string : DD member iSCSI name = "isns.client1" 36 | -------------------------------------------------------------------------------- /tests/data/Test06/registration3-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 2 4 | Last Index: 17 5 | -------------- 6 | Object: index=10 type= state=mature parent=14 7 | 0020 string : iSCSI name = "isns.client1" 8 | 0024 uint32 : iSCSI node index = 10 9 | 0021 uint32 : iSCSI node type = Initiator 10 | -------------- 11 | Object: index=13 type= state=mature 12 | 0811 uint32 : DD ID = 1 13 | 0812 string : DD name = "isns.dd1" 14 | 081e uint32 : DD features = 15 | 0813 uint32 : DD member iSCSI index = 10 16 | 0814 string : DD member iSCSI name = "isns.client1" 17 | -------------- 18 | Object: index=14 type= state=mature 19 | 0001 string : Entity identifier = "isns.entity.0001" 20 | 0002 uint32 : Entity protocol = iSCSI (2) 21 | 0006 uint32 : Registration Period = 7200 22 | 0004 uint64 : Timestamp = Wed Jan 22 16:45:45 2020 23 | 0007 uint32 : Entity index = 14 24 | -------------- 25 | Object: index=15 type= state=mature parent=14 26 | 0010 ipaddr : Portal IP address = 192.168.1.1 27 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 28 | 0016 uint32 : Portal index = 15 29 | -------------- 30 | Object: index=16 type= state=mature parent=14 31 | 0030 string : Portal group name = "isns.client1" 32 | 0031 ipaddr : Portal group address = 192.168.1.1 33 | 0032 uint32 : Portal group port = 860/tcp 34 | 0033 uint32 : Portal group tag = 1 35 | 0034 uint32 : Portal group index = 16 36 | -------------------------------------------------------------------------------- /tests/data/test06/04-dd-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 2 4 | Last Index: 14 5 | -------------- 6 | Object: index=9 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:05 2017 11 | 0007 uint32 : Entity index = 9 12 | -------------- 13 | Object: index=10 type= state=mature parent=9 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 10 17 | -------------- 18 | Object: index=11 type= state=mature parent=9 19 | 0010 ipaddr : Portal IP address = 192.168.1.2 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0016 uint32 : Portal index = 11 22 | -------------- 23 | Object: index=12 type= state=mature parent=9 24 | 0030 string : Portal group name = "isns.client1" 25 | 0031 ipaddr : Portal group address = 192.168.1.2 26 | 0032 uint32 : Portal group port = 860/tcp 27 | 0033 uint32 : Portal group tag = 1 28 | 0034 uint32 : Portal group index = 12 29 | -------------- 30 | Object: index=13 type= state=mature 31 | 0811 uint32 : DD ID = 1 32 | 0812 string : DD name = "isns.dd1" 33 | 081e uint32 : DD features = 34 | 0813 uint32 : DD member iSCSI index = 10 35 | 0814 string : DD member iSCSI name = "isns.client1" 36 | -------------------------------------------------------------------------------- /tests/data/test06/05-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 2 4 | Last Index: 17 5 | -------------- 6 | Object: index=10 type= state=mature parent=14 7 | 0020 string : iSCSI name = "isns.client1" 8 | 0024 uint32 : iSCSI node index = 10 9 | 0021 uint32 : iSCSI node type = Initiator 10 | -------------- 11 | Object: index=13 type= state=mature 12 | 0811 uint32 : DD ID = 1 13 | 0812 string : DD name = "isns.dd1" 14 | 081e uint32 : DD features = 15 | 0813 uint32 : DD member iSCSI index = 10 16 | 0814 string : DD member iSCSI name = "isns.client1" 17 | -------------- 18 | Object: index=14 type= state=mature 19 | 0001 string : Entity identifier = "isns.entity.0001" 20 | 0002 uint32 : Entity protocol = iSCSI (2) 21 | 0006 uint32 : Registration Period = 7200 22 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:05 2017 23 | 0007 uint32 : Entity index = 14 24 | -------------- 25 | Object: index=15 type= state=mature parent=14 26 | 0010 ipaddr : Portal IP address = 192.168.1.1 27 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 28 | 0016 uint32 : Portal index = 15 29 | -------------- 30 | Object: index=16 type= state=mature parent=14 31 | 0030 string : Portal group name = "isns.client1" 32 | 0031 ipaddr : Portal group address = 192.168.1.1 33 | 0032 uint32 : Portal group port = 860/tcp 34 | 0033 uint32 : Portal group tag = 1 35 | 0034 uint32 : Portal group index = 16 36 | -------------------------------------------------------------------------------- /tests/data/Test06/deregister: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 1 4 | Last Index: 22 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=13 type= state=limbo 21 | 0020 string : iSCSI name = "isns.client1" 22 | 0024 uint32 : iSCSI node index = 13 23 | -------------- 24 | Object: index=16 type= state=mature 25 | 0811 uint32 : DD ID = 1 26 | 0812 string : DD name = "isns.dd1" 27 | 081e uint32 : DD features = 28 | 0813 uint32 : DD member iSCSI index = 13 29 | 0814 string : DD member iSCSI name = "isns.client1" 30 | 0816 uint32 : DD member portal index = 18 31 | 0817 ipaddr : DD member portal addr = 192.168.1.1 32 | 0818 uint32 : DD member portal port = 860/tcp 33 | -------------- 34 | Object: index=18 type= state=limbo 35 | 0010 ipaddr : Portal IP address = 192.168.1.1 36 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 37 | 0016 uint32 : Portal index = 18 38 | -------------------------------------------------------------------------------- /include/libisns/types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Open-iSNS types 3 | * 4 | * Copyright (C) 2007 Olaf Kirch 5 | */ 6 | 7 | #ifndef ISNS_TYPES_H 8 | #define ISNS_TYPES_H 9 | 10 | typedef struct isns_simple isns_simple_t; 11 | typedef struct isns_source isns_source_t; 12 | typedef struct isns_object isns_object_t; 13 | typedef struct isns_relation isns_relation_t; 14 | typedef struct isns_attr isns_attr_t; 15 | typedef struct isns_attr_list isns_attr_list_t; 16 | typedef struct isns_message isns_message_t; 17 | typedef struct isns_socket isns_socket_t; 18 | typedef struct isns_db isns_db_t; 19 | typedef struct isns_tag_type isns_tag_type_t; 20 | typedef const struct isns_object_template isns_object_template_t; 21 | typedef struct isns_authdata isns_authdata_t; 22 | typedef struct isns_security isns_security_t; 23 | typedef struct isns_principal isns_principal_t; 24 | typedef struct isns_policy isns_policy_t; 25 | typedef struct isns_keystore isns_keystore_t; 26 | typedef struct isns_scope isns_scope_t; 27 | typedef struct isns_portal_info isns_portal_info_t; 28 | typedef struct isns_server isns_server_t; 29 | typedef struct isns_db_event isns_db_event_t; 30 | typedef struct isns_bitvector isns_bitvector_t; 31 | 32 | typedef struct isns_object_list { 33 | unsigned int iol_count; 34 | isns_object_t ** iol_data; 35 | } isns_object_list_t; 36 | 37 | #define ISNS_OBJECT_LIST_INIT { .iol_count = 0, .iol_data = NULL } 38 | 39 | /* 40 | * An attribute list 41 | */ 42 | struct isns_attr_list { 43 | unsigned int ial_count; 44 | isns_attr_t ** ial_data; 45 | }; 46 | #define ISNS_ATTR_LIST_INIT { .ial_count = 0, .ial_data = NULL } 47 | 48 | /* 49 | * Function types. 50 | */ 51 | typedef void isns_print_fn_t(const char *, ...); 52 | typedef void isns_timer_callback_t(void *); 53 | 54 | 55 | #endif /* ISNS_TYPES_H */ 56 | 57 | 58 | -------------------------------------------------------------------------------- /tests/data/test06/10-unregistration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 1 4 | Last Index: 22 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=13 type= state=limbo 21 | 0020 string : iSCSI name = "isns.client1" 22 | 0024 uint32 : iSCSI node index = 13 23 | -------------- 24 | Object: index=16 type= state=mature 25 | 0811 uint32 : DD ID = 1 26 | 0812 string : DD name = "isns.dd1" 27 | 081e uint32 : DD features = 28 | 0813 uint32 : DD member iSCSI index = 13 29 | 0814 string : DD member iSCSI name = "isns.client1" 30 | 0816 uint32 : DD member portal index = 18 31 | 0817 ipaddr : DD member portal addr = 192.168.1.1 32 | 0818 uint32 : DD member portal port = 860/tcp 33 | -------------- 34 | Object: index=18 type= state=limbo 35 | 0010 ipaddr : Portal IP address = 192.168.1.1 36 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 37 | 0016 uint32 : Portal index = 18 38 | -------------------------------------------------------------------------------- /tests/data/Test06/dd-registration2-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 2 4 | Last Index: 17 5 | -------------- 6 | Object: index=10 type= state=mature parent=14 7 | 0020 string : iSCSI name = "isns.client1" 8 | 0024 uint32 : iSCSI node index = 10 9 | 0021 uint32 : iSCSI node type = Initiator 10 | -------------- 11 | Object: index=13 type= state=mature 12 | 0811 uint32 : DD ID = 1 13 | 0812 string : DD name = "isns.dd1" 14 | 081e uint32 : DD features = 15 | 0813 uint32 : DD member iSCSI index = 10 16 | 0814 string : DD member iSCSI name = "isns.client1" 17 | 0816 uint32 : DD member portal index = 15 18 | 0817 ipaddr : DD member portal addr = 192.168.1.1 19 | 0818 uint32 : DD member portal port = 860/tcp 20 | -------------- 21 | Object: index=14 type= state=mature 22 | 0001 string : Entity identifier = "isns.entity.0001" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Thu Jan 23 08:20:22 2020 26 | 0007 uint32 : Entity index = 14 27 | -------------- 28 | Object: index=15 type= state=mature parent=14 29 | 0010 ipaddr : Portal IP address = 192.168.1.1 30 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 31 | 0016 uint32 : Portal index = 15 32 | -------------- 33 | Object: index=16 type= state=mature parent=14 34 | 0030 string : Portal group name = "isns.client1" 35 | 0031 ipaddr : Portal group address = 192.168.1.1 36 | 0032 uint32 : Portal group port = 860/tcp 37 | 0033 uint32 : Portal group tag = 1 38 | 0034 uint32 : Portal group index = 16 39 | -------------------------------------------------------------------------------- /tests/data/Test06/registration6-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 3 4 | Last Index: 21 5 | -------------- 6 | Object: index=10 type= state=mature parent=19 7 | 0020 string : iSCSI name = "isns.client1" 8 | 0024 uint32 : iSCSI node index = 10 9 | 0021 uint32 : iSCSI node type = Initiator 10 | -------------- 11 | Object: index=13 type= state=mature 12 | 0811 uint32 : DD ID = 1 13 | 0812 string : DD name = "isns.dd1" 14 | 081e uint32 : DD features = 15 | 0813 uint32 : DD member iSCSI index = 10 16 | 0814 string : DD member iSCSI name = "isns.client1" 17 | 0816 uint32 : DD member portal index = 15 18 | 0817 ipaddr : DD member portal addr = 192.168.1.1 19 | 0818 uint32 : DD member portal port = 860/tcp 20 | -------------- 21 | Object: index=15 type= state=mature parent=19 22 | 0010 ipaddr : Portal IP address = 192.168.1.1 23 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 24 | 0016 uint32 : Portal index = 15 25 | -------------- 26 | Object: index=19 type= state=mature 27 | 0001 string : Entity identifier = "isns.entity.0002" 28 | 0002 uint32 : Entity protocol = iSCSI (2) 29 | 0006 uint32 : Registration Period = 7200 30 | 0004 uint64 : Timestamp = Thu Jan 23 08:20:24 2020 31 | 0007 uint32 : Entity index = 19 32 | -------------- 33 | Object: index=20 type= state=mature parent=19 34 | 0030 string : Portal group name = "isns.client1" 35 | 0031 ipaddr : Portal group address = 192.168.1.1 36 | 0032 uint32 : Portal group port = 860/tcp 37 | 0033 uint32 : Portal group tag = 1 38 | 0034 uint32 : Portal group index = 20 39 | -------------------------------------------------------------------------------- /tests/data/test06/10-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 3 4 | Last Index: 21 5 | -------------- 6 | Object: index=10 type= state=mature parent=19 7 | 0020 string : iSCSI name = "isns.client1" 8 | 0024 uint32 : iSCSI node index = 10 9 | 0021 uint32 : iSCSI node type = Initiator 10 | -------------- 11 | Object: index=13 type= state=mature 12 | 0811 uint32 : DD ID = 1 13 | 0812 string : DD name = "isns.dd1" 14 | 081e uint32 : DD features = 15 | 0813 uint32 : DD member iSCSI index = 10 16 | 0814 string : DD member iSCSI name = "isns.client1" 17 | 0816 uint32 : DD member portal index = 15 18 | 0817 ipaddr : DD member portal addr = 192.168.1.1 19 | 0818 uint32 : DD member portal port = 860/tcp 20 | -------------- 21 | Object: index=15 type= state=mature parent=19 22 | 0010 ipaddr : Portal IP address = 192.168.1.1 23 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 24 | 0016 uint32 : Portal index = 15 25 | -------------- 26 | Object: index=19 type= state=mature 27 | 0001 string : Entity identifier = "isns.entity.0002" 28 | 0002 uint32 : Entity protocol = iSCSI (2) 29 | 0006 uint32 : Registration Period = 7200 30 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:05 2017 31 | 0007 uint32 : Entity index = 19 32 | -------------- 33 | Object: index=20 type= state=mature parent=19 34 | 0030 string : Portal group name = "isns.client1" 35 | 0031 ipaddr : Portal group address = 192.168.1.1 36 | 0032 uint32 : Portal group port = 860/tcp 37 | 0033 uint32 : Portal group tag = 1 38 | 0034 uint32 : Portal group index = 20 39 | -------------------------------------------------------------------------------- /tests/data/test06/06-dd-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 2 4 | Last Index: 17 5 | -------------- 6 | Object: index=10 type= state=mature parent=14 7 | 0020 string : iSCSI name = "isns.client1" 8 | 0024 uint32 : iSCSI node index = 10 9 | 0021 uint32 : iSCSI node type = Initiator 10 | -------------- 11 | Object: index=13 type= state=mature 12 | 0811 uint32 : DD ID = 1 13 | 0812 string : DD name = "isns.dd1" 14 | 081e uint32 : DD features = 15 | 0813 uint32 : DD member iSCSI index = 10 16 | 0814 string : DD member iSCSI name = "isns.client1" 17 | 0816 uint32 : DD member portal index = 15 18 | 0817 ipaddr : DD member portal addr = 192.168.1.1 19 | 0818 uint32 : DD member portal port = 860/tcp 20 | -------------- 21 | Object: index=14 type= state=mature 22 | 0001 string : Entity identifier = "isns.entity.0001" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:05 2017 26 | 0007 uint32 : Entity index = 14 27 | -------------- 28 | Object: index=15 type= state=mature parent=14 29 | 0010 ipaddr : Portal IP address = 192.168.1.1 30 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 31 | 0016 uint32 : Portal index = 15 32 | -------------- 33 | Object: index=16 type= state=mature parent=14 34 | 0030 string : Portal group name = "isns.client1" 35 | 0031 ipaddr : Portal group address = 192.168.1.1 36 | 0032 uint32 : Portal group port = 860/tcp 37 | 0033 uint32 : Portal group tag = 1 38 | 0034 uint32 : Portal group index = 16 39 | -------------------------------------------------------------------------------- /error.c: -------------------------------------------------------------------------------- 1 | /* 2 | * iSNS error strings etc. 3 | * 4 | * Copyright (C) 2007 Olaf Kirch 5 | */ 6 | 7 | #include 8 | 9 | const char * 10 | isns_strerror(enum isns_status status) 11 | { 12 | switch (status) { 13 | case ISNS_SUCCESS: 14 | return "Success"; 15 | case ISNS_UNKNOWN_ERROR: 16 | return "Unknown error"; 17 | case ISNS_MESSAGE_FORMAT_ERROR: 18 | return "Message format error"; 19 | case ISNS_INVALID_REGISTRATION: 20 | return "Invalid registration"; 21 | case ISNS_INVALID_QUERY: 22 | return "Invalid query"; 23 | case ISNS_SOURCE_UNKNOWN: 24 | return "Source unknown"; 25 | case ISNS_SOURCE_ABSENT: 26 | return "Source absent"; 27 | case ISNS_SOURCE_UNAUTHORIZED: 28 | return "Source unauthorized"; 29 | case ISNS_NO_SUCH_ENTRY: 30 | return "No such entry"; 31 | case ISNS_VERSION_NOT_SUPPORTED: 32 | return "Version not supported"; 33 | case ISNS_INTERNAL_ERROR: 34 | return "Internal error"; 35 | case ISNS_BUSY: 36 | return "Busy"; 37 | case ISNS_OPTION_NOT_UNDERSTOOD: 38 | return "Option not understood"; 39 | case ISNS_INVALID_UPDATE: 40 | return "Invalid update"; 41 | case ISNS_MESSAGE_NOT_SUPPORTED: 42 | return "Message not supported"; 43 | case ISNS_SCN_EVENT_REJECTED: 44 | return "SCN event rejected"; 45 | case ISNS_SCN_REGISTRATION_REJECTED: 46 | return "SCN registration rejected"; 47 | case ISNS_ATTRIBUTE_NOT_IMPLEMENTED: 48 | return "Attribute not implemented"; 49 | case ISNS_FC_DOMAIN_ID_NOT_AVAILABLE: 50 | return "FC domain id not available"; 51 | case ISNS_FC_DOMAIN_ID_NOT_ALLOCATED: 52 | return "FC domain id not allocated"; 53 | case ISNS_ESI_NOT_AVAILABLE: 54 | return "ESI not available"; 55 | case ISNS_INVALID_DEREGISTRATION: 56 | return "Invalid deregistration"; 57 | case ISNS_REGISTRATION_FEATURE_NOT_SUPPORTED: 58 | return "Registration feature not supported"; 59 | default: 60 | break; 61 | } 62 | 63 | return "Unknown iSNS status code"; 64 | } 65 | 66 | -------------------------------------------------------------------------------- /tests/data/Test02/query2-1: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Wed Jan 22 19:29:13 2020 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | object[4] = 22 | 0001 string : Entity identifier = "client2.isns-test.eu" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Wed Jan 22 19:29:13 2020 26 | 0007 uint32 : Entity index = 9 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 10 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 11 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 12 41 | -------------------------------------------------------------------------------- /tests/data/Test02/query2-1-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Tue Jan 21 20:11:01 2020 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | object[4] = 22 | 0001 string : Entity identifier = "isns.entity.0002" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Tue Jan 21 20:11:01 2020 26 | 0007 uint32 : Entity index = 5 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 6 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 7 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 8 41 | -------------------------------------------------------------------------------- /tests/data/Test02/query2-2: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Wed Jan 22 19:29:16 2020 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | object[4] = 22 | 0001 string : Entity identifier = "client2.isns-test.eu" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Wed Jan 22 19:29:16 2020 26 | 0007 uint32 : Entity index = 9 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 10 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 11 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 12 41 | -------------------------------------------------------------------------------- /tests/data/Test02/query2-2-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Tue Jan 21 20:23:05 2020 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | object[4] = 22 | 0001 string : Entity identifier = "isns.entity.0002" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Tue Jan 21 20:23:05 2020 26 | 0007 uint32 : Entity index = 5 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 6 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 7 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 8 41 | -------------------------------------------------------------------------------- /tests/data/Test02/query3: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Wed Jan 22 19:29:13 2020 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | object[4] = 22 | 0001 string : Entity identifier = "client2.isns-test.eu" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Wed Jan 22 19:29:13 2020 26 | 0007 uint32 : Entity index = 9 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 10 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 11 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 12 41 | -------------------------------------------------------------------------------- /tests/data/Test02/query3-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Wed Jan 22 09:03:13 2020 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | object[4] = 22 | 0001 string : Entity identifier = "isns.entity.0002" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Wed Jan 22 09:03:13 2020 26 | 0007 uint32 : Entity index = 5 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 6 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 7 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 8 41 | -------------------------------------------------------------------------------- /tests/data/test02/05-query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Nov 17 16:59:21 2017 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | object[4] = 22 | 0001 string : Entity identifier = "isns.entity.0002" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Fri Nov 17 16:59:21 2017 26 | 0007 uint32 : Entity index = 5 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 6 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 7 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 8 41 | -------------------------------------------------------------------------------- /tests/data/test02/06-query-no-security: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "isns.entity.0001" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Nov 17 12:12:43 2017 6 | 0007 uint32 : Entity index = 1 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 2 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 3 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 4 21 | object[4] = 22 | 0001 string : Entity identifier = "isns.entity.0002" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Fri Nov 17 12:12:43 2017 26 | 0007 uint32 : Entity index = 5 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 6 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 7 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 8 41 | -------------------------------------------------------------------------------- /tests/data/test02/07-query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Sep 14 13:18:54 2007 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | object[4] = 22 | 0001 string : Entity identifier = "client2.isns-test.eu" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Fri Sep 14 13:18:54 2007 26 | 0007 uint32 : Entity index = 9 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 10 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 11 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 12 41 | -------------------------------------------------------------------------------- /tests/data/test02/08-query: -------------------------------------------------------------------------------- 1 | object[0] = 2 | 0001 string : Entity identifier = "client1.isns-test.eu" 3 | 0002 uint32 : Entity protocol = iSCSI (2) 4 | 0006 uint32 : Registration Period = 7200 5 | 0004 uint64 : Timestamp = Fri Sep 14 13:18:54 2007 6 | 0007 uint32 : Entity index = 5 7 | object[1] = 8 | 0020 string : iSCSI name = "isns.client1" 9 | 0021 uint32 : iSCSI node type = Initiator 10 | 0024 uint32 : iSCSI node index = 6 11 | object[2] = 12 | 0010 ipaddr : Portal IP address = 127.1.0.1 13 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 14 | 0016 uint32 : Portal index = 7 15 | object[3] = 16 | 0030 string : Portal group name = "isns.client1" 17 | 0031 ipaddr : Portal group address = 127.1.0.1 18 | 0032 uint32 : Portal group port = 860/tcp 19 | 0033 uint32 : Portal group tag = 1 20 | 0034 uint32 : Portal group index = 8 21 | object[4] = 22 | 0001 string : Entity identifier = "client2.isns-test.eu" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Fri Sep 14 13:18:54 2007 26 | 0007 uint32 : Entity index = 9 27 | object[5] = 28 | 0020 string : iSCSI name = "isns.client2" 29 | 0021 uint32 : iSCSI node type = Target 30 | 0024 uint32 : iSCSI node index = 10 31 | object[6] = 32 | 0010 ipaddr : Portal IP address = 127.1.0.2 33 | 0011 uint32 : Portal TCP/UDP port = 3260/tcp 34 | 0016 uint32 : Portal index = 11 35 | object[7] = 36 | 0030 string : Portal group name = "isns.client2" 37 | 0031 ipaddr : Portal group address = 127.1.0.2 38 | 0032 uint32 : Portal group port = 3260/tcp 39 | 0033 uint32 : Portal group tag = 1 40 | 0034 uint32 : Portal group index = 12 41 | -------------------------------------------------------------------------------- /tests/data/Test07/expired2-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test07/server0/database 3 | Last EID: 2 4 | Last Index: 7 5 | -------------- 6 | Object: index=1 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0001" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Thu Jan 23 08:49:28 2020 11 | 0007 uint32 : Entity index = 1 12 | -------------- 13 | Object: index=2 type= state=mature parent=1 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 2 17 | -------------- 18 | Object: index=3 type= state=mature parent=1 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0014 uint32 : ESI port = 65535/tcp 22 | 0013 uint32 : ESI interval = 300 23 | 0016 uint32 : Portal index = 3 24 | -------------- 25 | Object: index=4 type= state=mature parent=1 26 | 0030 string : Portal group name = "isns.client1" 27 | 0031 ipaddr : Portal group address = 127.0.0.1 28 | 0032 uint32 : Portal group port = 860/tcp 29 | 0033 uint32 : Portal group tag = 1 30 | 0034 uint32 : Portal group index = 4 31 | -------------- 32 | Object: index=5 type= state=mature parent=1 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 1/tcp 35 | 0016 uint32 : Portal index = 5 36 | -------------- 37 | Object: index=6 type= state=mature parent=1 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 1/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 6 43 | -------------------------------------------------------------------------------- /tests/data/test07/03-registration-no-security: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test07/server0/database 3 | Last EID: 3 4 | Last Index: 11 5 | -------------- 6 | Object: index=5 type= state=mature 7 | 0001 string : Entity identifier = "isns.entity.0002" 8 | 0002 uint32 : Entity protocol = iSCSI (2) 9 | 0006 uint32 : Registration Period = 7200 10 | 0004 uint64 : Timestamp = Fri Nov 17 17:46:57 2017 11 | 0007 uint32 : Entity index = 5 12 | -------------- 13 | Object: index=6 type= state=mature parent=5 14 | 0020 string : iSCSI name = "isns.client1" 15 | 0021 uint32 : iSCSI node type = Initiator 16 | 0024 uint32 : iSCSI node index = 6 17 | -------------- 18 | Object: index=7 type= state=mature parent=5 19 | 0010 ipaddr : Portal IP address = 127.0.0.1 20 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 21 | 0014 uint32 : ESI port = 65535/tcp 22 | 0013 uint32 : ESI interval = 5 23 | 0016 uint32 : Portal index = 7 24 | -------------- 25 | Object: index=8 type= state=mature parent=5 26 | 0010 ipaddr : Portal IP address = 127.0.0.1 27 | 0011 uint32 : Portal TCP/UDP port = 1/tcp 28 | 0016 uint32 : Portal index = 8 29 | -------------- 30 | Object: index=9 type= state=mature parent=5 31 | 0030 string : Portal group name = "isns.client1" 32 | 0031 ipaddr : Portal group address = 127.0.0.1 33 | 0032 uint32 : Portal group port = 860/tcp 34 | 0033 uint32 : Portal group tag = 1 35 | 0034 uint32 : Portal group index = 9 36 | -------------- 37 | Object: index=10 type= state=mature parent=5 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 1/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 10 43 | -------------------------------------------------------------------------------- /tests/data/Test03/deregister1: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test03/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:30:14 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=limbo 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/Test04/restart: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test04/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:30:54 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/Test05/expired: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test05/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:31:25 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/test03/03-unregistration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test03/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Fri Sep 14 13:25:47 2007 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=limbo 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/Test01/registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test01/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:23:12 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/Test03/registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test03/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:30:12 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/Test04/registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test04/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:30:52 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/Test05/registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test05/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:31:23 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/Test06/registration1: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:32:58 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/test04/03-restart: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test04/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Fri Sep 14 13:38:41 2007 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/test05/02-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test05/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 20 24 | 0004 uint64 : Timestamp = Fri Sep 14 13:40:40 2007 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/test01/02-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test01/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Fri Sep 14 12:40:58 2007 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/test03/02-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test03/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Fri Sep 14 13:36:35 2007 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/test04/02-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test04/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Fri Sep 14 13:38:41 2007 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/test06/02-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Fri Sep 14 13:41:51 2007 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 6 36 | -------------- 37 | Object: index=7 type= state=mature parent=4 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 127.0.0.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 7 43 | -------------------------------------------------------------------------------- /tests/data/Test06/registration2-1: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 1 4 | Last Index: 12 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=8 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:33:00 2020 25 | 0007 uint32 : Entity index = 8 26 | -------------- 27 | Object: index=9 type= state=mature parent=8 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 9 31 | -------------- 32 | Object: index=10 type= state=mature parent=8 33 | 0010 ipaddr : Portal IP address = 192.168.1.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 10 36 | -------------- 37 | Object: index=11 type= state=mature parent=8 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 192.168.1.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 11 43 | -------------------------------------------------------------------------------- /tests/data/test06/03-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 1 4 | Last Index: 12 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=8 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Fri Sep 14 13:41:51 2007 25 | 0007 uint32 : Entity index = 8 26 | -------------- 27 | Object: index=9 type= state=mature parent=8 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 9 31 | -------------- 32 | Object: index=10 type= state=mature parent=8 33 | 0010 ipaddr : Portal IP address = 192.168.1.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 10 36 | -------------- 37 | Object: index=11 type= state=mature parent=8 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 192.168.1.1 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 11 43 | -------------------------------------------------------------------------------- /tests/data/Test06/registration2-2: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test06/server0/database 3 | Last EID: 1 4 | Last Index: 16 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=12 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Wed Jan 22 19:33:00 2020 25 | 0007 uint32 : Entity index = 12 26 | -------------- 27 | Object: index=13 type= state=mature parent=12 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 13 31 | -------------- 32 | Object: index=14 type= state=mature parent=12 33 | 0010 ipaddr : Portal IP address = 192.168.1.2 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 14 36 | -------------- 37 | Object: index=15 type= state=mature parent=12 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 192.168.1.2 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 15 43 | -------------------------------------------------------------------------------- /tests/data/test06/04-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test06/server0/database 3 | Last EID: 1 4 | Last Index: 16 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 01 b7 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=12 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Fri Sep 14 13:41:51 2007 25 | 0007 uint32 : Entity index = 12 26 | -------------- 27 | Object: index=13 type= state=mature parent=12 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 13 31 | -------------- 32 | Object: index=14 type= state=mature parent=12 33 | 0010 ipaddr : Portal IP address = 192.168.1.2 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0016 uint32 : Portal index = 14 36 | -------------- 37 | Object: index=15 type= state=mature parent=12 38 | 0030 string : Portal group name = "isns.client1" 39 | 0031 ipaddr : Portal group address = 192.168.1.2 40 | 0032 uint32 : Portal group port = 860/tcp 41 | 0033 uint32 : Portal group tag = 1 42 | 0034 uint32 : Portal group index = 15 43 | -------------------------------------------------------------------------------- /pidfile.c: -------------------------------------------------------------------------------- 1 | /* 2 | * write pidfile 3 | * 4 | * Copyright (C) 2007 Olaf Kirch 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | #include 15 | 16 | static void 17 | __update_pidfile(int fd) 18 | { 19 | char pidbuf[32]; 20 | 21 | snprintf(pidbuf, sizeof(pidbuf), "%u\n", getpid()); 22 | if (write(fd, pidbuf, strlen(pidbuf)) < 0) 23 | isns_fatal("Error writing pid file: %m\n"); 24 | close(fd); 25 | } 26 | 27 | static pid_t 28 | __read_pidfile(const char *filename) 29 | { 30 | char pidbuf[32]; 31 | FILE *fp; 32 | pid_t pid = -1; 33 | 34 | fp = fopen(filename, "r"); 35 | if (fp != NULL) { 36 | if (fgets(pidbuf, sizeof(pidbuf), fp)) 37 | pid = strtoul(pidbuf, NULL, 0); 38 | fclose(fp); 39 | } 40 | return pid; 41 | } 42 | 43 | void 44 | isns_write_pidfile(const char *filename) 45 | { 46 | int fd; 47 | pid_t pid; 48 | 49 | fd = open(filename, O_CREAT|O_EXCL|O_WRONLY, 0644); 50 | if (fd >= 0) { 51 | __update_pidfile(fd); 52 | return; 53 | } 54 | 55 | if (errno != EEXIST) 56 | isns_fatal("Error creating pid file %s: %m\n", 57 | filename); 58 | 59 | /* If the pid file is stale, remove it. 60 | * Not really needed in real life, but 61 | * highly convenient for debugging :) */ 62 | if ((pid = __read_pidfile(filename)) > 0 63 | && kill(pid, 0) < 0 64 | && errno == ESRCH) { 65 | isns_debug_general( 66 | "Removing stale PID file %s\n", 67 | filename); 68 | unlink(filename); 69 | } 70 | 71 | /* Try again */ 72 | fd = open(filename, O_CREAT|O_EXCL|O_WRONLY, 0644); 73 | if (fd < 0) 74 | isns_fatal("PID file exists; another daemon " 75 | "seems to be running\n"); 76 | 77 | __update_pidfile(fd); 78 | } 79 | 80 | void 81 | isns_update_pidfile(const char *filename) 82 | { 83 | int fd; 84 | 85 | fd = open(filename, O_WRONLY); 86 | if (fd < 0) { 87 | isns_fatal("Error opening pid file %s: %m\n", 88 | filename); 89 | } 90 | 91 | __update_pidfile(fd); 92 | } 93 | 94 | void 95 | isns_remove_pidfile(const char *filename) 96 | { 97 | unlink(filename); 98 | } 99 | -------------------------------------------------------------------------------- /tests/data/Test07/expired1: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test07/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 48 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Thu Jan 23 08:51:50 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0014 uint32 : ESI port = 65535/tcp 36 | 0013 uint32 : ESI interval = 300 37 | 0016 uint32 : Portal index = 6 38 | -------------- 39 | Object: index=7 type= state=mature parent=4 40 | 0030 string : Portal group name = "isns.client1" 41 | 0031 ipaddr : Portal group address = 127.0.0.1 42 | 0032 uint32 : Portal group port = 860/tcp 43 | 0033 uint32 : Portal group tag = 1 44 | 0034 uint32 : Portal group index = 7 45 | -------------------------------------------------------------------------------- /tests/data/Test07/registration1: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/Test07/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | -------------- 10 | Object: index=2 type= state=mature parent=1 PRIVATE 11 | 0601v string : Security Policy Index = "client1.isns-test.eu" 12 | 0607v string : Policy allowed node name = "isns.client1" 13 | 0603v opaque : DSA security key = <30 82 03 47 30 82 02 3a 06 07 2a 86 48 ce 38 04 01 30 82 02... 14 | -------------- 15 | Object: index=3 type= state=mature parent=1 PRIVATE 16 | 0020 string : iSCSI name = "isns.control" 17 | 0021 uint32 : iSCSI node type = 18 | 0024 uint32 : iSCSI node index = 3 19 | -------------- 20 | Object: index=4 type= state=mature 21 | 0001 string : Entity identifier = "client1.isns-test.eu" 22 | 0002 uint32 : Entity protocol = iSCSI (2) 23 | 0006 uint32 : Registration Period = 7200 24 | 0004 uint64 : Timestamp = Thu Jan 23 08:51:30 2020 25 | 0007 uint32 : Entity index = 4 26 | -------------- 27 | Object: index=5 type= state=mature parent=4 28 | 0020 string : iSCSI name = "isns.client1" 29 | 0021 uint32 : iSCSI node type = Initiator 30 | 0024 uint32 : iSCSI node index = 5 31 | -------------- 32 | Object: index=6 type= state=mature parent=4 33 | 0010 ipaddr : Portal IP address = 127.0.0.1 34 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 35 | 0014 uint32 : ESI port = 65535/tcp 36 | 0013 uint32 : ESI interval = 300 37 | 0016 uint32 : Portal index = 6 38 | -------------- 39 | Object: index=7 type= state=mature parent=4 40 | 0030 string : Portal group name = "isns.client1" 41 | 0031 ipaddr : Portal group address = 127.0.0.1 42 | 0032 uint32 : Portal group port = 860/tcp 43 | 0033 uint32 : Portal group tag = 1 44 | 0034 uint32 : Portal group index = 7 45 | -------------------------------------------------------------------------------- /authblock.c: -------------------------------------------------------------------------------- 1 | /* 2 | * iSNS authentication functions 3 | * 4 | * Copyright (C) 2007 Olaf Kirch 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | /* We impose an artificial limit on the size of 15 | * the size of the authenticator 16 | */ 17 | #define ISNS_SPISTR_MAX 512 18 | 19 | int 20 | isns_authblock_decode(buf_t *bp, struct isns_authblk *auth) 21 | { 22 | unsigned int avail = buf_avail(bp); 23 | uint32_t tmp_32bit_val; 24 | uint64_t tmp_64bit_val; 25 | 26 | /* 27 | * we cannot pass packed structure members from isns_authblk 28 | * to buf_getNN() or we will get an alignment error 29 | */ 30 | 31 | if (!buf_get32(bp, &tmp_32bit_val)) 32 | return 0; 33 | auth->iab_bsd = tmp_32bit_val; 34 | 35 | if (!buf_get32(bp, &tmp_32bit_val)) 36 | return 0; 37 | auth->iab_length = tmp_32bit_val; 38 | 39 | if (!buf_get64(bp, &tmp_64bit_val)) 40 | return 0; 41 | auth->iab_timestamp = tmp_64bit_val; 42 | 43 | if (!buf_get32(bp, &tmp_32bit_val)) 44 | return 0; 45 | auth->iab_spi_len = tmp_32bit_val; 46 | 47 | /* Make sure the length specified by the auth block 48 | * is reasonable. */ 49 | if (auth->iab_length < ISNS_AUTHBLK_SIZE 50 | || auth->iab_length > avail) 51 | return 0; 52 | 53 | /* This chops off any data trailing the auth block. 54 | * It also makes sure that we detect if iab_length 55 | * exceeds the amount of available data. */ 56 | if (!buf_truncate(bp, auth->iab_length - ISNS_AUTHBLK_SIZE)) 57 | return 0; 58 | 59 | auth->iab_spi = buf_head(bp); 60 | if (!buf_pull(bp, auth->iab_spi_len)) 61 | return 0; 62 | 63 | auth->iab_sig = buf_head(bp); 64 | auth->iab_sig_len = buf_avail(bp); 65 | return 1; 66 | } 67 | 68 | int 69 | isns_authblock_encode(buf_t *bp, const struct isns_authblk *auth) 70 | { 71 | if (!buf_put32(bp, auth->iab_bsd) 72 | || !buf_put32(bp, auth->iab_length) 73 | || !buf_put64(bp, auth->iab_timestamp) 74 | || !buf_put32(bp, auth->iab_spi_len) 75 | || !buf_put(bp, auth->iab_spi, auth->iab_spi_len) 76 | || !buf_put(bp, auth->iab_sig, auth->iab_sig_len)) 77 | return 0; 78 | return 1; 79 | } 80 | -------------------------------------------------------------------------------- /tests/data/test07/02-registration: -------------------------------------------------------------------------------- 1 | Dumping database contents 2 | Backend: /tmp/isns-test/test07/server0/database 3 | Last EID: 1 4 | Last Index: 8 5 | -------------- 6 | Object: index=1 type= state=mature PRIVATE 7 | 0001 string : Entity identifier = "CONTROL" 8 | 0007 uint32 : Entity index = 1 9 | 0004 uint64 : Timestamp = Fri Sep 14 13:42:57 2007 10 | -------------- 11 | Object: index=2 type= state=mature parent=1 PRIVATE 12 | 0601v string : Security Policy Index = "client1.isns-test.eu" 13 | 0607v string : Policy allowed node name = "isns.client1" 14 | 0603v opaque : DSA security key = <30 82 01 b6 30 82 01 2b 06 07 2a 86 48 ce 38 04 01 30 82 01... 15 | -------------- 16 | Object: index=3 type= state=mature parent=1 PRIVATE 17 | 0020 string : iSCSI name = "isns.control" 18 | 0021 uint32 : iSCSI node type = 19 | 0024 uint32 : iSCSI node index = 3 20 | -------------- 21 | Object: index=4 type= state=mature 22 | 0001 string : Entity identifier = "client1.isns-test.eu" 23 | 0002 uint32 : Entity protocol = iSCSI (2) 24 | 0006 uint32 : Registration Period = 7200 25 | 0004 uint64 : Timestamp = Fri Sep 14 13:42:57 2007 26 | 0007 uint32 : Entity index = 4 27 | -------------- 28 | Object: index=5 type= state=mature parent=4 29 | 0020 string : iSCSI name = "isns.client1" 30 | 0024 uint32 : iSCSI node index = 5 31 | 0021 uint32 : iSCSI node type = Initiator 32 | -------------- 33 | Object: index=6 type= state=mature parent=4 34 | 0010 ipaddr : Portal IP address = 127.0.0.1 35 | 0011 uint32 : Portal TCP/UDP port = 860/tcp 36 | 0016 uint32 : Portal index = 6 37 | 0014 uint32 : ESI port = 65535/tcp 38 | 0013 uint32 : ESI interval = 5 39 | -------------- 40 | Object: index=7 type= state=mature parent=4 41 | 0030 string : Portal group name = "isns.client1" 42 | 0031 ipaddr : Portal group address = 127.0.0.1 43 | 0032 uint32 : Portal group port = 860/tcp 44 | 0033 uint32 : Portal group tag = 1 45 | 0034 uint32 : Portal group index = 7 46 | -------------------------------------------------------------------------------- /etc/isnsadm.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Sample iSNS client configuration file 3 | # 4 | 5 | # The source name. This is an iSCSI qualified name, 6 | # and identifies the client uniquely. 7 | # 8 | # If left empty, the source name is derived from 9 | # the client's hostname. 10 | # 11 | #SourceName = iqn.2006-01.com.example.host1 12 | 13 | # Name and port of the iSNS server. 14 | # Possible formats: 15 | # foo.example.com 16 | # foo.example.com:3205 17 | # 192.168.1.7:isns 18 | # [2001:4e5f::1]:isns 19 | # SLP: 20 | # If the special string "SLP:" is given, Open-iSNS will 21 | # query the SLP directory service to find the iSNS server. 22 | #ServerAddress = isns.example.com 23 | 24 | 25 | # Authentication enable/disable. 26 | # When set to 1, the client will sign 27 | # all messages, and expect all server messages 28 | # to be signed. 29 | # 30 | # Authentication requires a valid private DSA 31 | # key in AuthKeyFile, and the server's DSA public 32 | # key in ServerKeyFile. 33 | # 34 | # The default is to use authentication if the 35 | # requires keys are installed, and use unauthenticated 36 | # iSNS otherwise. 37 | #Security = 1 38 | 39 | # Location of the client's private key. 40 | # The file must contain a PEM encoded DSA key. 41 | # The default is /etc/isns/auth_key 42 | #AuthKeyFile = /etc/isns/auth_key 43 | 44 | # Location of the servers's public key. 45 | # The file must contain a PEM encoded DSA key. 46 | # The default is /etc/isns/server_key.pub 47 | #ServerKeyFile = /etc/isns/server_key.pub 48 | 49 | # In order to prevent replay attacks, the 50 | # authentication blocks carried by iSNS 51 | # include a time stamp. The following two 52 | # parameters control how we verify the 53 | # time stamp 54 | Auth.ReplayWindow = 2m 55 | Auth.TimeStampJitter = 1s 56 | 57 | # Maximum number of incoming connections 58 | # accepted. This usually applies to server 59 | # side only, but is relevant if you create 60 | # a passive TCP socket for ESI or SCN. 61 | # Network.MaxSockets = 1024 62 | 63 | # Time to wait for a TCP connection to be 64 | # established. 65 | # Network.ConnectTimeout = 60 66 | 67 | # When a connection attempt failed, we wait 68 | # before we try connecting again. 69 | # Network.ReonnectTimeout = 10 70 | 71 | # Total amount of time to wait before timing 72 | # out a call to the iSNS server. 73 | # Network.CallTimeout = 60 74 | -------------------------------------------------------------------------------- /etc/isnsdd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # Sample iSNS Discovery Daemon configuration file 3 | # 4 | 5 | # The source name. This is an iSCSI qualified name, 6 | # and identifies the client uniquely. 7 | # 8 | # If left empty, the source name is derived from 9 | # the client's hostname. 10 | # 11 | #SourceName = iqn.2006-01.com.example.host1:monitor 12 | 13 | # Name and port of the iSNS server. 14 | # Possible formats: 15 | # foo.example.com 16 | # foo.example.com:3205 17 | # 192.168.1.7:isns 18 | # [2001:4e5f::1]:isns 19 | # SLP: 20 | # If the special string "SLP:" is given, Open-iSNS will 21 | # query the SLP directory service to find the iSNS server. 22 | #ServerAddress = isns.example.com 23 | 24 | # Authentication enable/disable. 25 | # When set to 1, the client will sign 26 | # all messages, and expect all server messages 27 | # to be signed. 28 | # 29 | # Authentication requires a valid private DSA 30 | # key in AuthKeyFile, and the server's DSA public 31 | # key in ServerKeyFile. 32 | # 33 | # The default is to use authentication if the 34 | # required keys are installed, and use unauthenticated 35 | # iSNS otherwise. 36 | #Security = 1 37 | 38 | # Location of the client's private key. 39 | # The file must contain a PEM encoded DSA key. 40 | # The default is /etc/isns/auth_key 41 | #AuthKeyFile = /etc/isns/auth_key 42 | 43 | # Location of the servers's public key. 44 | # The file must contain a PEM encoded DSA key. 45 | # The default is /etc/isns/server_key.pub 46 | #ServerKeyFile = /etc/isns/server_key.pub 47 | 48 | # In order to prevent replay attacks, the 49 | # authentication blocks carried by iSNS 50 | # include a time stamp. The following two 51 | # parameters control how we verify the 52 | # time stamp 53 | Auth.ReplayWindow = 2m 54 | Auth.TimeStampJitter = 1s 55 | 56 | # Maximum number of incoming connections 57 | # accepted. This usually applies to server 58 | # side only, but is relevant if you create 59 | # a passive TCP socket for ESI or SCN. 60 | # Network.MaxSockets = 1024 61 | 62 | # Time to wait for a TCP connection to be 63 | # established. 64 | # Network.ConnectTimeout = 60 65 | 66 | # When a connection attempt failed, we wait 67 | # before we try connecting again. 68 | # Network.ReonnectTimeout = 10 69 | 70 | # Total amount of time to wait before timing 71 | # out a call to the iSNS server. 72 | # Network.CallTimeout = 60 73 | -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- 1 | Testing 2 | ======= 3 | 4 | This directory contains the isnsd selftests. Binaries needed for 5 | testing are created by running meson/ninja in the above directory. 6 | See the README file there for direction on building there. 7 | 8 | You can run these tests manually, as detailed below, or you 9 | can run them from the parent (main) directory, using: 10 | 11 | # ninja -C builddir test 12 | 13 | which runs the 'bitvector' test program, then runs 14 | (from the builddir directory): 15 | 16 | # tests/test-isns.py -f -D ../tests 17 | 18 | which runs all the unittests in the "tests" subdirectory, 19 | stopping at the first failure. 20 | 21 | To run the tests manually, use the "test-isns.py" script directly. 22 | If you run it from this directory, you do not need to pass in 23 | the "-D DIRECTORY" argument, as it default to the directory 24 | you are in. 25 | 26 | Calling the script with no arguments runs all tests. You can pass 27 | in the "--help" option to see the other options. 28 | 29 | The tests must be run as root. You do not want the isnsd 30 | service running, as the tests start/stop their own daemon. 31 | 32 | For reference, here are current test options: 33 | -h, --help show this help message and exit 34 | -v, --verbose Verbose output 35 | -q, --quiet Quiet output 36 | --locals Show local variables in tracebacks 37 | -f, --failfast Stop on first fail or error 38 | -c, --catch Catch Ctrl-C and display results so far 39 | -b, --buffer Buffer stdout and stderr during tests 40 | -k TESTNAMEPATTERNS Only run tests which match the given substring 41 | -s, --secure Enable security 42 | -d, --debug Enable developer debugging 43 | -l, --list Lists tests and exits 44 | -D TEST_DIR, --test-dir TEST_DIR 45 | Sets the test dir (default '.') 46 | 47 | You can list the unittest name using the "-l" option. By default 48 | the script runs all unit tests, in order, but you can specify tests 49 | to be run by specifying the Unittest name(s), e.g. 50 | 51 | # ./isns-test.py -v Test01 [...] 52 | 53 | Note: You can also specify subtests within that unit test, but that's a 54 | bad idea, as the subtests in each unit test are meant to be run together, 55 | in order. So running some subtest in the middle of a unit test will 56 | generally fail. 57 | --------------------------------------------------------------------------------