summaryrefslogtreecommitdiff
path: root/ctdb/protocol/protocol_basic.c
AgeCommit message (Collapse)AuthorFilesLines
2022-02-23ctdb-protocol: CID 1499395: Uninitialized variables (UNINIT)Martin Schwenke1-1/+1
Issue is reported here: 853 case CTDB_CONTROL_DB_VACUUM: { 854 struct ctdb_db_vacuum db_vacuum; 855 >>> CID 1499395: Uninitialized variables (UNINIT) >>> Using uninitialized value "db_vacuum.full_vacuum_run" when calling "ctdb_db_vacuum_len". 856 CHECK_CONTROL_DATA_SIZE(ctdb_db_vacuum_len(&db_vacuum)); 857 return ctdb_control_db_vacuum(ctdb, c, indata, async_reply); 858 } The problem is that ctdb_bool_len() unnecessarily dereferences its argument, which in this case is &db_vacuum.full_vacuum_run. Not a security issue because the value copied by dereferencing is not used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Feb 23 02:02:06 UTC 2022 on sn-devel-184
2018-07-05ctdb-protocol: Separate protocol-basic subsystemAmitay Isaacs1-3/+1
This includes marshalling code for basic data types. This will be used by other daemons. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add padding data type to handle structure paddingAmitay Isaacs1-0/+33
This takes care of alignment sizes, so that it works on both 32-bit and 64-bit architectures. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for struct timevalAmitay Isaacs1-0/+23
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for pid_tAmitay Isaacs1-6/+7
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for a string with lengthAmitay Isaacs1-33/+29
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for a stringAmitay Isaacs1-12/+24
Always return NULL terminated strings. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for fixed size char arrayAmitay Isaacs1-0/+24
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for boolAmitay Isaacs1-0/+39
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for doubleAmitay Isaacs1-6/+7
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for uint64_tAmitay Isaacs1-6/+7
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for uint32_tAmitay Isaacs1-6/+7
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Fix marshalling for int32_tAmitay Isaacs1-6/+7
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for uint16_tAmitay Isaacs1-0/+22
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Add marshalling for uint8_tAmitay Isaacs1-0/+22
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
2017-08-30ctdb-protocol: Separate marshalling for basic data typesAmitay Isaacs1-0/+226
This splits protocol_types.c and creates new protocol_basic.c. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>