This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-commitlog@lists.osmocom.org/.
gitosis at osmocom.org gitosis at osmocom.orgThis is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "UNNAMED PROJECT". The branch, neels/subscr_vty has been updated discards 9109ab62b059d106e8b93943203244c6ea590266 (commit) discards 5d1b6af89b22ffcdb3ccc62d528f7ba70d15af53 (commit) discards 186d90b2aa63ba2f777a0af656460719f812a217 (commit) discards 2a8191cce1cc71f02fa6074be6cc2acf33593561 (commit) discards 116587612502c503091c7fbdf631c4d47101bc5c (commit) discards 213e70b8866ccfae1c6b74a1e96c55d5cef37551 (commit) discards eaa8bfca06393f5c86de87bae0bf8c58148c573e (commit) discards f02a1940f9b0f1877743e4157d21c76335912b87 (commit) discards d8382ab6ef897304eeffd14e0411dbd4deb8fd01 (commit) discards 128161caae812ac208ecb6a883ff508510d76820 (commit) discards 5ecc2c7c543c2d7b2c556bb4caefdaa21ef33513 (commit) discards 4f921648d911a069778fee7f430563688078c53b (commit) discards 5b9603456f9174b8921e4a677213eeea29b0a721 (commit) discards f85801faa1382d7d94964f382e04c9632ccc1fc9 (commit) discards 66616b1d29d929a59e0bd869c00c0a5f74122cef (commit) discards 94907ca45bb4cb8233a896de2eaca2b8fecba553 (commit) discards b4ba579c1c23f6eb78bbc7f067f852d1da1ff013 (commit) discards 201e9dc92e233dd93919e7639d8a4c34b6398889 (commit) discards aaa451f8bec804f326109e33f44b68715dc87abd (commit) discards 224bbe053864ec639f96436d56d3401a9d4cf17c (commit) discards 011902ee79a6fdc4567765a11038760f912d3f03 (commit) discards f5c2390c2858785ebeffed935a18cc3d6ff0d5c4 (commit) discards a69547ecb346ee606d9a289caff93b319fe5710f (commit) discards 7fbd82bda57656d37ab614636d12b060265ba7da (commit) discards 7e8a572e5c78fee018fdcbce6ca9d4b6d6463af1 (commit) discards d6f580a0456a7b64f154ccdca28feab70227a13f (commit) discards a27f8af0485c95436d9d9423dd069989ff89e9d7 (commit) discards 85a0e57bc3459234efd5acb8900ab52a997fa554 (commit) discards 3ef07d2596b3c2eee8570d3ed779379c2b6330dd (commit) discards d4650f67a31b7919ee9f8297459e66eb09c3d46c (commit) via 1139b1a3ad54462aab9ee9fec728ca16bd58a550 (commit) via aec168e7b3ca472e08f8e949279425e4136b3379 (commit) via 3b30f04a517181315d644118f8513f977c7baebb (commit) via 66304c8ed487ac2a4b9f8e2263ab574e520e3fa2 (commit) via 67cbdfd935652532b812fd6933ac951634575c13 (commit) via 9a35f7f10601c9fc632cc6278088c651f4b4ced8 (commit) via 8c23f4f49ac485873423d9ad37459f3aab098dca (commit) via d0cbff26481aabd6467241bc305f966a989ed8f6 (commit) via 8869f0a63507d468ad243daa17e14baa3dbd4e37 (commit) via 2c15e53663d7c2f171914b3a195b5008268aaa81 (commit) via d28f4be55c7817d7256b6949f02797c08ffe0d9e (commit) via 35c9f7fda8fdb976444ef46cbbb0c438f8ad080e (commit) via 8e1237b63f541a27452b0119f549c7992dfe9dc0 (commit) via d1060aa554910599e20741bee282b1fcd3cd5037 (commit) via 2ad8b4d5b3d8b3473b9e4797ac3de55050e164a6 (commit) via 88fc2402c1935e0a159c96923fb2f3c09f33695e (commit) via 0df66a4c4a149884f3115d143f9551cd1b6ddf6b (commit) via 40aa61ccf0e45df0d7e1d58521a118d4c5a953ee (commit) via 0cac0a067e5824d0e0dc6b3109d7f33974c60df4 (commit) via f31445915e79cc07236941c5fd5ce16268eaa255 (commit) via 518335e688ea79a41cb6ce0b6b65ad829ece6f3f (commit) via 4bde949b34a8dc53734373e57b5e36955775b81d (commit) This update added new revisions after undoing existing revisions. That is to say, the old revision is not a strict subset of the new revision. This situation occurs when you --force push a change and generate a repository containing something like this: * -- * -- B -- O -- O -- O (9109ab62b059d106e8b93943203244c6ea590266) \ N -- N -- N (1139b1a3ad54462aab9ee9fec728ca16bd58a550) When this happens we assume that you've already had alert emails for all of the O revisions, and so we here report only the revisions in the N branch from the common base, B. Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cgit.osmocom.org/osmo-hlr/commit/?id=1139b1a3ad54462aab9ee9fec728ca16bd58a550 commit 1139b1a3ad54462aab9ee9fec728ca16bd58a550 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 02:59:54 2017 +0200 implement subscriber vty, tests Change-Id: I42b3b70a0439a8f2e4964d7cc31e593c1f0d7537 http://cgit.osmocom.org/osmo-hlr/commit/?id=aec168e7b3ca472e08f8e949279425e4136b3379 commit aec168e7b3ca472e08f8e949279425e4136b3379 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 18:24:56 2017 +0200 db_get_auth_data cosmetic TODO Change-Id: I0dea71455025231a28205db663f4682bc7a4441e http://cgit.osmocom.org/osmo-hlr/commit/?id=3b30f04a517181315d644118f8513f977c7baebb commit 3b30f04a517181315d644118f8513f977c7baebb Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 23:12:57 2017 +0200 code undup: use db_bind_text() in db_get_auth_data() To make the db_bind_text() error reporting mention "imsi", change the DB_STMT_AUC_BY_IMSI to use a named parameter. Change-Id: I49bd5eb78170cf4cdf8abb386c766d20d9f1cf73 http://cgit.osmocom.org/osmo-hlr/commit/?id=66304c8ed487ac2a4b9f8e2263ab574e520e3fa2 commit 66304c8ed487ac2a4b9f8e2263ab574e520e3fa2 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 23:03:57 2017 +0200 fix db_update_sqn(): reset stmt in all error cases Use the common db_bind_int64() so that the stmt bindings are cleared for any errors and to get error logging for free. On error with sqlite3_step(), log the SQL error message, and make sure the stmt is cleared of bindings and reset. After sqlite3_step(), verify that exactly one row was modifed, log and return errors otherwise. After this patch, the DB interaction closely matches the other (refactored) DB functions. Change-Id: I0d870d405e2e0a830360d9ad19f0a3f9e09d8cf2 http://cgit.osmocom.org/osmo-hlr/commit/?id=67cbdfd935652532b812fd6933ac951634575c13 commit 67cbdfd935652532b812fd6933ac951634575c13 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 22:49:25 2017 +0200 code undup: use db_remove_reset() in db_auc.c Change-Id: I32d728e2b8a9771421c097647aa0e060e29a601f http://cgit.osmocom.org/osmo-hlr/commit/?id=9a35f7f10601c9fc632cc6278088c651f4b4ced8 commit 9a35f7f10601c9fc632cc6278088c651f4b4ced8 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 17:51:13 2017 +0200 refactor db_get_auth_data return val Adopt the error handling of the other db functions: return -ENOENT on unknown subscriber and -EIO on SQL failure. Return 0 for no error, instead of the number of rows modified. Adjust the single caller: db_get_auc() (and db_test.c). Change-Id: I006f471962bdad95d00a3a4c41a28ebbc9740884 http://cgit.osmocom.org/osmo-hlr/commit/?id=8c23f4f49ac485873423d9ad37459f3aab098dca commit 8c23f4f49ac485873423d9ad37459f3aab098dca Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Tue Oct 10 02:25:00 2017 +0200 add db_subscr_update_aud_by_id(), complete db_subscr_delete_by_id() Add ability to add and remove auc_2g and auc_3g table rows with db_subscr_update_aud_by_id(). In db_subscr_delete_by_id(), make sure that when deleting a subscriber, also all auth data associated with that user ID is removed as well. A newly created subscriber must not obtain the same auth tokens just by getting the same id. Change-Id: Icb11b5e059fb920447a9aa414db1819a0c020529 http://cgit.osmocom.org/osmo-hlr/commit/?id=d0cbff26481aabd6467241bc305f966a989ed8f6 commit d0cbff26481aabd6467241bc305f966a989ed8f6 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 17:48:51 2017 +0200 refactor db_subscr_purge Use named parameters in the SQL statements. Use db_bind_* functions to drop some code dup. Adopt error handling (rc and logging) to match the other db functions: return -ENOENT for unknown subscriber, -EIO for SQL failures. Change-Id: Iad49d29b90a708c6cf55bfb3bcc02d9e29001a15 http://cgit.osmocom.org/osmo-hlr/commit/?id=8869f0a63507d468ad243daa17e14baa3dbd4e37 commit 8869f0a63507d468ad243daa17e14baa3dbd4e37 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 17:36:08 2017 +0200 refactor db_subscr_lu() Use named parameters in the SQL statement. Use db_bind_* functions to drop some code dup. Use explicit subscriber id arg instead of subscriber struct. Match return values and error logging to other db functions. Change-Id: I35665e84ddbe54a6f218b24033df969ad2e669a0 http://cgit.osmocom.org/osmo-hlr/commit/?id=2c15e53663d7c2f171914b3a195b5008268aaa81 commit 2c15e53663d7c2f171914b3a195b5008268aaa81 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 04:10:06 2017 +0200 refactor db_subscr_ps() to db_subscr_nam() Allow to set nam_ps and nam_cs from this same function, by adding the is_ps arg. Combine both NAM_PS stmts to DB_STMT_UPD_NAM_PS_BY_IMSI, add another such stmt for CS. Use named parameters instead of parameter indexes. Improve error return values as well as error logging to clearly indicate whether the operation could not find the requested IMSI, or other errors occured. Adjust the single caller. This prepares for upcoming VTY and possibly CTRL commands, and the error handling introduced here has been or will be adopted by other functions in previous or subsequent patches. Change-Id: I6e70e15228f5bb10bee6758ae5dc9687d65839bd http://cgit.osmocom.org/osmo-hlr/commit/?id=d28f4be55c7817d7256b6949f02797c08ffe0d9e commit d28f4be55c7817d7256b6949f02797c08ffe0d9e Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 17:30:32 2017 +0200 add db_subscr_get_by_msisdn() and db_subscr_get_by_id() Factor out the selected SQL columns as SEL_COLUMNS macro, so that each of the new DB_STMTs will select identical columns: the old DB_STMT_SEL_BY_IMSI as well as the new DB_STMT_SEL_BY_MSISDN and DB_STMT_SEL_BY_ID. Add the new functions db_subscr_get_by_msisdn() and db_subscr_get_by_id() and factor out common parts with db_subscr_get_by_imsi() to static db_sel(). Change-Id: I6d0ddd1b7e3f6b180b4b1b2663c5725d2a4a9428 http://cgit.osmocom.org/osmo-hlr/commit/?id=35c9f7fda8fdb976444ef46cbbb0c438f8ad080e commit 35c9f7fda8fdb976444ef46cbbb0c438f8ad080e Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 04:26:21 2017 +0200 db: use int64_t as subscriber id The SQLite db does not support uint64_t, and we are always binding the uint64_t id actually as signed int64_t. Hence be consistent and actually handle it as int64_t in the code as well. This means that if we ever see a negative subscriber ID in the SQL database (however unlikely), we will also see it negative in our log output. The SQN handled in osmo_auth* is actually of unsigned type, and, unless we store the SQN as 64bit hex string, we are forced to feed this unsigned value as signed int64_t to the SQLite API. The upcoming db regression test for SQN in change-id I0d870d405e2e0a830360d9ad19f0a3f9e09d8cf2 verifies that the SQN uint64_t translates to signed int64_t and back as expected. Change-Id: I83a47289a48ac37da0f712845d422e897a5e8171 http://cgit.osmocom.org/osmo-hlr/commit/?id=8e1237b63f541a27452b0119f549c7992dfe9dc0 commit 8e1237b63f541a27452b0119f549c7992dfe9dc0 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 03:50:30 2017 +0200 less noise: simplify db_remove_reset() db_remove_reset() needs to be called after each stmt run, whether it succeeded or not. In case sqlite3_clear_bindings() would fail to unbind a stmt, we would anyway be beyond recovery. There seem to be no plausible situations where such failure would occur, unless there have been no bindings in the first place. In case there was an SQL stmt failure, sqlite3_reset() will re-barf the same error message, we will always have logged it earlier already in the proper context. We are never evaluating the return value, nor would we know how to recover from non-success. The conclusions: - db_remove_reset() does not need to log any errors. - db_remove_reset() does not need to return success. Change-Id: I21678463e59f607f5f5c5732963e274392f0fffd http://cgit.osmocom.org/osmo-hlr/commit/?id=d1060aa554910599e20741bee282b1fcd3cd5037 commit d1060aa554910599e20741bee282b1fcd3cd5037 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 17:28:53 2017 +0200 add initial db_test: creating and deleting subscribers Change-Id: I2a0d277f55162bf5ceb0fc7d50390f2994daed71 http://cgit.osmocom.org/osmo-hlr/commit/?id=2ad8b4d5b3d8b3473b9e4797ac3de55050e164a6 commit 2ad8b4d5b3d8b3473b9e4797ac3de55050e164a6 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 17:55:16 2017 +0200 add db_subscr_create(), db_subscr_delete(), db_subscr_update_msisdn_by_imsi() These will be needed by VTY commands to create, delete and modify subscribers. Auth data editing will follow in another patch. The FIXME "also remove authentication data from auc_2g and auc_3g" will get fixed in change-id Icb11b5e059fb920447a9aa414db1819a0c020529. Change-Id: I725273d36234331093e7fff7d5f12f6be6ab2623 http://cgit.osmocom.org/osmo-hlr/commit/?id=88fc2402c1935e0a159c96923fb2f3c09f33695e commit 88fc2402c1935e0a159c96923fb2f3c09f33695e Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 03:44:57 2017 +0200 add db_bind_int() and db_bind_int64() Will be used in upcoming patches, e.g. change-IDs - I6e70e15228f5bb10bee6758ae5dc9687d65839bd - I83a47289a48ac37da0f712845d422e897a5e8171 Change-Id: I705a15eef242c98feb6e95a883916f6cf8173d70 http://cgit.osmocom.org/osmo-hlr/commit/?id=0df66a4c4a149884f3115d143f9551cd1b6ddf6b commit 0df66a4c4a149884f3115d143f9551cd1b6ddf6b Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 04:20:37 2017 +0200 cosmetic: don't log about missing SQLite log cb SQLite3 seems to be commonly compiled without log callback support. It is then misleading to see a seeming error message about this on each osmo-hlr startup. Avoid the impression that we would miss out on important logging: simply ignore any errors upon registering the log callback. We do receive logging on each DB error. Change-Id: I78d75dc351eb587b0a022f82f147e9a31c0324c5 http://cgit.osmocom.org/osmo-hlr/commit/?id=40aa61ccf0e45df0d7e1d58521a118d4c5a953ee commit 40aa61ccf0e45df0d7e1d58521a118d4c5a953ee Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 17:56:04 2017 +0200 cosmetic: log IMSI='<imsi>', log "no such subscriber" In LOGHLR and LOGAUC, log IMSI='<imsi>' instead of just <imsi>: In the log, it is not always obvious to the reader that the printed number refers to an IMSI (vs. an MSISDN or in the future an IMEI). In db_get_auth_data(), log "No such subscriber" instead of just "Unknown", to clarify what exactly is meant. Change-Id: I2ec8ab5e67d4e95083f6e39232fc91ebaa080cb8 http://cgit.osmocom.org/osmo-hlr/commit/?id=0cac0a067e5824d0e0dc6b3109d7f33974c60df4 commit 0cac0a067e5824d0e0dc6b3109d7f33974c60df4 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Mon Oct 9 17:47:21 2017 +0200 cosmetic: multi-line DB_STMT_AUC_BY_IMSI In multiple lines, the statement becomes more readable. I'd like to get this change out of the way before upcoming SQL statement edits and additions. Change-Id: Icf09f4bbb298a516aa52c81e3ca67d9d91d8c7c2 http://cgit.osmocom.org/osmo-hlr/commit/?id=f31445915e79cc07236941c5fd5ce16268eaa255 commit f31445915e79cc07236941c5fd5ce16268eaa255 Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 03:40:52 2017 +0200 cosmetic: refactor db_bind_imsi() as db_bind_text() There are more uses for a generalized db_bind_text(), and in an upcoming patch there will be similar functions like db_bind_int(). Also, add argument param_name, optionally indicating a named SQL parameter to bind to, which will be used in subsequent patches. So far, all callers pass NULL to yield previous db_bind_imsi() behavior of binding to the first param. Change-Id: I87bc46a23a724677e8319d6a4b032976b7ba9394 http://cgit.osmocom.org/osmo-hlr/commit/?id=518335e688ea79a41cb6ce0b6b65ad829ece6f3f commit 518335e688ea79a41cb6ce0b6b65ad829ece6f3f Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 03:20:14 2017 +0200 cosmetic: rename db_subscr_get() to db_subscr_get_by_imsi() There will be more additions, _by_msisdn() and _by_id(), to serve the upcoming VTY commands, to allow flexibly selecting subscribers as in the old OsmoNITB. Change-Id: I32fa676ccc5c10eba834c4390c8a42476b9c1961 http://cgit.osmocom.org/osmo-hlr/commit/?id=4bde949b34a8dc53734373e57b5e36955775b81d commit 4bde949b34a8dc53734373e57b5e36955775b81d Author: Neels Hofmeyr <neels at hofmeyr.de> Date: Fri Oct 6 03:09:34 2017 +0200 cosmetic: prepend DB_STMT_ to enum stmt_idx entries There are upcoming additions, and some seem too general without a proper common prefix in the identifiers, like 'CREATE'. Change-Id: I51b677db31a1ebbbc45dc7925074de7493fbde1f ----------------------------------------------------------------------- Summary of changes: src/db.c | 17 ++- src/db.h | 11 +- src/db_auc.c | 73 ++++------ src/db_hlr.c | 201 +++++++++++++------------- tests/db/db_test.c | 165 ++++++++++++++++------ tests/db/db_test.err | 389 +++++++++++++++++++++++++++++++++++++++------------ 6 files changed, 566 insertions(+), 290 deletions(-) hooks/post-receive -- UNNAMED PROJECT