[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-275-g3ea0a0b
The branch, v3-2-test has been updated via 3ea0a0beb47bf91b71d949de5abb797177721dcc (commit) via df848d8eeeb102288a3acb9a0f8a7015e0c6ca6b (commit) via 76dad05e4ce4b4cb26557bc151359ed9d58d6317 (commit) via d553b5d72569c1496bfa3de703c9bf15a9a6cb60 (commit) via e4f2c856ec716697af4815491b5ae8ddb263cd51 (commit) via 860316cbe70836882bff16b39f0deb5c12cbd1f3 (commit) via 7454e426f2ea9aa42620ed5bcb34c85797b9e21b (commit) via 3a1d79116b693bc25af1106c9a43ffd275ac3d1e (commit) via 93ea27a3e23e489a2af3c778684f8a8a4594b567 (commit) via 331d7fd2ea6d8aeb029478a6ab8d4051fa2c03fd (commit) via a99b51159a7db5f249ff136cf9ba758d14380a35 (commit) via e1d4a2fa5b5b0f21d1ea4a9dffc326878c9f54b7 (commit) via 9315de404812d89dddcec6ac4ae17c34f5012746 (commit) via 95525772f2791f0fb999fe9f271da5b0fbdc62d8 (commit) via 966b2414cb6efdfe5acb412ed9bdfd7589ee694c (commit) via 76e4cdc25fc9a7e47fd9a356dc54533b62c5db08 (commit) via f357b1ddd3ea552163151f27b4ec70fe0488a0ba (commit) via 8b0dd1e7582eef71275eea2da2b444588412c517 (commit) via 7fd0ae3edce8a6ae913344cc0974181c19179b23 (commit) via d39957e2c9216ef01b2ef53863c0ef5d3a9b5fee (commit) via 79f37d47655ec26176a8da5f47e1c7400888a2ef (commit) via 3c42d8ee16a4b143c6658fe26030569658eaef66 (commit) from 2fd25423700cb60f20a8b8d6613279cb06fb518d (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 3ea0a0beb47bf91b71d949de5abb797177721dcc Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:44:26 2008 +0100 registry: convert regdb REGISTRY_OPS to named struct initializers. Michael commit df848d8eeeb102288a3acb9a0f8a7015e0c6ca6b Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:39:16 2008 +0100 registry: use talloc instead of malloc and provide common exit point in regdb_get_secdesc(). Michael commit 76dad05e4ce4b4cb26557bc151359ed9d58d6317 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:32:47 2008 +0100 registry: remove an unused variable from regdb_set_secdesc(). Michael commit d553b5d72569c1496bfa3de703c9bf15a9a6cb60 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:31:47 2008 +0100 registry: untangle assignments and if statements in regdb_set_secdesc(). Michael commit e4f2c856ec716697af4815491b5ae8ddb263cd51 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:27:27 2008 +0100 registry: use talloc_stackframe instead of hand crafted temporary context. Michael commit 860316cbe70836882bff16b39f0deb5c12cbd1f3 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:26:35 2008 +0100 registry: use talloc instead of malloc for tdb data in regdb_store_values(). Michael commit 7454e426f2ea9aa42620ed5bcb34c85797b9e21b Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:20:18 2008 +0100 registry: don't use talloc_stackframe() instead of talloc_tos() als temp ctx in regdb_store_values(). Also provide common exit path for freeing memory. Michael commit 3a1d79116b693bc25af1106c9a43ffd275ac3d1e Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:17:15 2008 +0100 registry: don't leak to talloc stack in regdb_fetch_keys(). Michael commit 93ea27a3e23e489a2af3c778684f8a8a4594b567 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:09:31 2008 +0100 registry: explicitly use talloc context instead of talloc_tos() in regdb_fetch_keys(). Michael commit 331d7fd2ea6d8aeb029478a6ab8d4051fa2c03fd Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:05:48 2008 +0100 registry: don't leak on success path in regdb_store_keys(). Michael commit a99b51159a7db5f249ff136cf9ba758d14380a35 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:02:47 2008 +0100 registry: allocate tempory data in talloc stack in regdb_store_keys(). Michael commit e1d4a2fa5b5b0f21d1ea4a9dffc326878c9f54b7 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:00:40 2008 +0100 registry: separate cancel and failur exit paths in regdb_store_keys(). Michael commit 9315de404812d89dddcec6ac4ae17c34f5012746 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 00:43:56 2008 +0100 registry: don't leak memory on transaction fail in regdb_store_keys(). Michael commit 95525772f2791f0fb999fe9f271da5b0fbdc62d8 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 00:41:59 2008 +0100 registry: don't leak (to talloc_tos()) in regdb_store_keys(). use talloc_stackframe() and free on error path. Michael commit 966b2414cb6efdfe5acb412ed9bdfd7589ee694c Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 00:22:12 2008 +0100 registry:
[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-276-g948ab77
The branch, v3-2-test has been updated via 948ab77863b12b1b0bd1c970004b84b9bb1bb2fa (commit) from 3ea0a0beb47bf91b71d949de5abb797177721dcc (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 948ab77863b12b1b0bd1c970004b84b9bb1bb2fa Author: Volker Lendecke [EMAIL PROTECTED] Date: Fri Mar 14 20:35:38 2008 +0100 Convert pdb_tdb to use dbwrap --- Summary of changes: source/passdb/pdb_tdb.c | 634 +++ 1 files changed, 316 insertions(+), 318 deletions(-) Changeset truncated at 500 lines: diff --git a/source/passdb/pdb_tdb.c b/source/passdb/pdb_tdb.c index b05a42b..25aa6b4 100644 --- a/source/passdb/pdb_tdb.c +++ b/source/passdb/pdb_tdb.c @@ -41,13 +41,13 @@ static int tdbsam_debug_level = DBGC_ALL; #define TDBSAM_VERSION_STRING INFO/version #define PASSDB_FILE_NAME passdb.tdb #define USERPREFIX USER_ +#define USERPREFIX_LEN 5 #define RIDPREFIX RID_ #define PRIVPREFIX PRIV_ /* GLOBAL TDB SAM CONTEXT */ -static TDB_CONTEXT *tdbsam; -static int ref_count = 0; +static struct db_context *db_sam; static char *tdbsam_filename; /** @@ -690,110 +690,129 @@ static uint32 init_buffer_from_sam (uint8 **buf, struct samu *sampass, bool size Intialize a BYTE buffer from a struct samu struct */ -static bool tdbsam_convert(int32 from) +struct tdbsam_convert_state { + int32_t from; + bool success; +}; + +static int tdbsam_convert_one(struct db_record *rec, void *priv) { - const char *vstring = TDBSAM_VERSION_STRING; - const char *prefix = USERPREFIX; - TDB_DATAdata, key, old_key; - uint8 *buf = NULL; - boolret; + struct tdbsam_convert_state *state = + (struct tdbsam_convert_state *)priv; + struct samu *user; + TDB_DATA data; + NTSTATUS status; + bool ret; - /* handle a Samba upgrade */ - tdb_lock_bystring(tdbsam, vstring); - - /* Enumerate all records and convert them */ - key = tdb_firstkey(tdbsam); + if (rec-key.dsize USERPREFIX_LEN) { + return 0; + } + if (strncmp((char *)rec-key.dptr, USERPREFIX, USERPREFIX_LEN) != 0) { + return 0; + } - while (key.dptr) { - - /* skip all non-USER entries (eg. RIDs) */ - while ((key.dsize != 0) (strncmp((const char *)key.dptr, prefix, strlen (prefix { - old_key = key; - /* increment to next in line */ - key = tdb_nextkey(tdbsam, key); - SAFE_FREE(old_key.dptr); - } - - if (key.dptr) { - struct samu *user = NULL; - - /* read from tdbsam */ - data = tdb_fetch(tdbsam, key); - if (!data.dptr) { - DEBUG(0,(tdbsam_convert: database entry not found: %s.\n,key.dptr)); - return False; - } - - /* unpack the buffer from the former format */ - if ( !(user = samu_new( NULL )) ) { - DEBUG(0,(tdbsam_convert: samu_new() failed!\n)); - SAFE_FREE( data.dptr ); - return False; - } - DEBUG(10,(tdbsam_convert: Try unpacking a record with (key:%s) (version:%d)\n, key.dptr, from)); - switch (from) { - case 0: - ret = init_sam_from_buffer_v0(user, (uint8 *)data.dptr, data.dsize); - break; - case 1: - ret = init_sam_from_buffer_v1(user, (uint8 *)data.dptr, data.dsize); - break; - case 2: - ret = init_sam_from_buffer_v2(user, (uint8 *)data.dptr, data.dsize); - break; - case 3: - ret = init_sam_from_buffer_v3(user, (uint8 *)data.dptr, data.dsize); - break; - default: - /* unknown tdbsam version */ - ret = False; - } - if (!ret) { -
[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-277-g64664d2
The branch, v3-2-test has been updated via 64664d25cf84e5e0f4a4876b2c38c127b310dbc5 (commit) from 948ab77863b12b1b0bd1c970004b84b9bb1bb2fa (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 64664d25cf84e5e0f4a4876b2c38c127b310dbc5 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 12:21:32 2008 +0100 registry: untangle assignment and if-clause in init_registry_data(). Michael --- Summary of changes: source/registry/reg_backend_db.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/registry/reg_backend_db.c b/source/registry/reg_backend_db.c index 1378d00..08f74eb 100644 --- a/source/registry/reg_backend_db.c +++ b/source/registry/reg_backend_db.c @@ -196,7 +196,8 @@ static bool init_registry_data(void) for (i=0; builtin_registry_values[i].path != NULL; i++) { - if (!(values = TALLOC_ZERO_P(frame, REGVAL_CTR))) { + values = TALLOC_ZERO_P(frame, REGVAL_CTR); + if (values == NULL) { goto fail; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre2-80-g734f1fb
The branch, v3-2-stable has been updated via 734f1fb431eaf5bd8836e5625db5c06a6aad4d06 (commit) via 9607db8844eeeab88fe66505f76f5cb786797a6f (commit) via 1ce8da6c8a8a7184eb738fb15e8b8132aa263875 (commit) via 9cbac89e3d2926dd25d30b81ddbaf0bbe075cc80 (commit) via cc1adc63337ec5a1354553cc3caafaee36e80968 (commit) via 05f1a5b4ee5b6d5d8388a2da1ef8898c1e3a4594 (commit) via c3fee5b352f5fe4dc9805441e226df7757a832d3 (commit) via 9ef1af9c5c39b11e4d1e2a7f56af3a37c84699bb (commit) via ffd092a1cf0c1a74fd1cda8856ef88397b9adee8 (commit) via bd2c600b2b20066fc71b32563f33ff11738b6530 (commit) via a980e33c0cb125bf6ed6d8a3b47156ab7f03db33 (commit) via d9032e59b7aa3b8242fb585a55f9005db6a363be (commit) via 07b346eb3530a745a7a7c026c55bf7cc3ec4ef4d (commit) via 66acb7c32275ad07309a9d00ec3242be22d2ba59 (commit) via c1248f213312af0cb3bbd5c164e953d0cddfe0ac (commit) via d206f55c3f0d495eb4321adc7673ef27f56a31a6 (commit) via 6c8c970ca0975932532a22d6ad68d4d017965e63 (commit) via c3cf7fd4121a9021166436b945b83cf588d539d9 (commit) via 4782e3a92adb4f12bdcbd0ffaa10d5aa624ef488 (commit) via c01011626bef427c20f2ad671977221f07cf65b3 (commit) via 64a336ad9451931a4637a37038da327a3fca527e (commit) via 5e2417ce88cb3e35642aa475cfd610d9c79434c4 (commit) via 686724e5483d1b9b8dd94d1e051bc2807e9d5d82 (commit) via d65c0cd1bbd54e7aec9f0b69b76166b7c58ba663 (commit) via ecbc067bbf5a22dd1ad8e9881af047c427b27e58 (commit) via 380ce42f5aabd649a88d9598900e9357534b3c06 (commit) via 4b6b201fceb32c3f49acb57af004167c9cba7dd2 (commit) via 5112a999494a6bd2590af910b4a8c53c53316ad6 (commit) via bdfa8dd8c6820712834a6ab5c6a4abdb37d6c230 (commit) via 4cb0c14db4d4bf0c1d4d6e3ca8feba79d559aff8 (commit) via 683406ad730f8c0bd9b9e5c3a1277f548373614e (commit) via c6b2906b4863d920f084dc183b8a83e483785a8e (commit) via eadf9034130689396d47f9ca543ba3d38bf4ef5e (commit) via bfdf6f4f9eda7a6d0cae7f5abe81e7ff443430d3 (commit) via ea21dc9d8e458fbbf9f7b8eb7d55f2ff1103317d (commit) via b8dbb6444d82da23f8d44b02131e52ba5e1397d0 (commit) via c4b15391d2fb9f07999c91387560d7d94a917fb4 (commit) via cbce50f10afa14164c039d94a56a8c342333a666 (commit) via ba336476fa42dfc858982653b5ff2907ad55cd14 (commit) via e6d6282c689fe1496daf1a6ddb037bee47c9f9e1 (commit) via c86dbfc9579a4fdccb1cb958020f7d9c461139b4 (commit) via d05a7e09d05da85b2b907f359105152fe92531bb (commit) from ac10927ca6b480274b15a29962caa9b81b77185a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable - Log - commit 734f1fb431eaf5bd8836e5625db5c06a6aad4d06 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 12:21:32 2008 +0100 registry: untangle assignment and if-clause in init_registry_data(). Michael (cherry picked from commit 64664d25cf84e5e0f4a4876b2c38c127b310dbc5) commit 9607db8844eeeab88fe66505f76f5cb786797a6f Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:44:26 2008 +0100 registry: convert regdb REGISTRY_OPS to named struct initializers. Michael (cherry picked from commit 3ea0a0beb47bf91b71d949de5abb797177721dcc) commit 1ce8da6c8a8a7184eb738fb15e8b8132aa263875 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:39:16 2008 +0100 registry: use talloc instead of malloc and provide common exit point in regdb_get_secdesc(). Michael (cherry picked from commit df848d8eeeb102288a3acb9a0f8a7015e0c6ca6b) commit 9cbac89e3d2926dd25d30b81ddbaf0bbe075cc80 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:32:47 2008 +0100 registry: remove an unused variable from regdb_set_secdesc(). Michael (cherry picked from commit 76dad05e4ce4b4cb26557bc151359ed9d58d6317) commit cc1adc63337ec5a1354553cc3caafaee36e80968 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:31:47 2008 +0100 registry: untangle assignments and if statements in regdb_set_secdesc(). Michael (cherry picked from commit d553b5d72569c1496bfa3de703c9bf15a9a6cb60) commit 05f1a5b4ee5b6d5d8388a2da1ef8898c1e3a4594 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:27:27 2008 +0100 registry: use talloc_stackframe instead of hand crafted temporary context. Michael (cherry picked from commit e4f2c856ec716697af4815491b5ae8ddb263cd51) commit c3fee5b352f5fe4dc9805441e226df7757a832d3 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 01:26:35 2008 +0100 registry: use talloc instead of malloc for tdb data in regdb_store_values(). Michael (cherry picked from commit 860316cbe70836882bff16b39f0deb5c12cbd1f3) commit 9ef1af9c5c39b11e4d1e2a7f56af3a37c84699bb Author: Michael Adam [EMAIL
[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-281-g065938c
The branch, v3-2-test has been updated via 065938ccb7bb0052746267c433637f0e05b95d85 (commit) via 64b1625f8e3bca43504871747bef6631e1b18f44 (commit) via 46e50da0d550e43de3aaf0141c64f25e1c9997c2 (commit) via f5e26d28be6581149bed0b599c38b82d1a4e (commit) from 64664d25cf84e5e0f4a4876b2c38c127b310dbc5 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 065938ccb7bb0052746267c433637f0e05b95d85 Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Mar 17 14:45:59 2008 +0100 In smbstatus, mark locking.tdb and sessionid.tdb as CLEAR_IF_FIRST This is needed to inform ctdb that it's not a persistent database, with the O_RDONLY the tdb backend ignores this. Merge from 491f902098d33f in 3-0-ctdb commit 64b1625f8e3bca43504871747bef6631e1b18f44 Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Mar 17 14:40:07 2008 +0100 Merge leftovers of 0e1a86bc845 in 3-0-ctdb commit 46e50da0d550e43de3aaf0141c64f25e1c9997c2 Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Mar 17 14:12:10 2008 +0100 Use right control to attach to persistent databases This is a merge of 2a8f8b26f08ab09c34dff82417e541d8eb1ec91c and 4e6508dfee0d872a7fa42c9e58ba565137a27b3f from 3-0-ctdb commit f5e26d28be6581149bed0b599c38b82d1a4e Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Mar 17 13:51:50 2008 +0100 Add net idmap aclmapset This is a merge from 3-0-ctdb that goes along with 1daad835, the option nfs4:sidmap option --- Summary of changes: source/lib/ctdbd_conn.c |7 +++- source/locking/brlock.c |2 +- source/locking/locking.c |7 ++--- source/utils/net_idmap.c | 65 ++ source/utils/status.c|4 +- 5 files changed, 76 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/ctdbd_conn.c b/source/lib/ctdbd_conn.c index 18e9879..46936c5 100644 --- a/source/lib/ctdbd_conn.c +++ b/source/lib/ctdbd_conn.c @@ -820,13 +820,16 @@ NTSTATUS ctdbd_db_attach(struct ctdbd_connection *conn, NTSTATUS status; TDB_DATA data; int32_t cstatus; + bool persistent = (tdb_flags TDB_CLEAR_IF_FIRST) == 0; data.dptr = (uint8_t*)name; data.dsize = strlen(name)+1; status = ctdbd_control(conn, CTDB_CURRENT_NODE, - CTDB_CONTROL_DB_ATTACH, 0, data, - NULL, data, cstatus); + persistent + ? CTDB_CONTROL_DB_ATTACH_PERSISTENT + : CTDB_CONTROL_DB_ATTACH, + 0, data, NULL, data, cstatus); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, (__location__ ctdb_control for db_attach failed: %s\n, nt_errstr(status))); diff --git a/source/locking/brlock.c b/source/locking/brlock.c index 341d00f..940dfbf 100644 --- a/source/locking/brlock.c +++ b/source/locking/brlock.c @@ -265,7 +265,7 @@ void brl_init(bool read_only) } brlock_db = db_open(NULL, lock_path(brlock.tdb), lp_open_files_db_hash_size(), - TDB_DEFAULT | TDB_CLEAR_IF_FIRST, + TDB_DEFAULT|TDB_VOLATILE|TDB_CLEAR_IF_FIRST, read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644 ); if (!brlock_db) { DEBUG(0,(Failed to open byte range locking database %s\n, diff --git a/source/locking/locking.c b/source/locking/locking.c index 513bb31..782e10f 100644 --- a/source/locking/locking.c +++ b/source/locking/locking.c @@ -392,10 +392,9 @@ static bool locking_init_internal(bool read_only) if (lock_db) return True; - lock_db = db_open(NULL, lock_path(locking.tdb), 0, - TDB_DEFAULT - |TDB_VOLATILE - |(read_only?0x0:TDB_CLEAR_IF_FIRST), + lock_db = db_open(NULL, lock_path(locking.tdb), + lp_open_files_db_hash_size(), + TDB_DEFAULT|TDB_VOLATILE|TDB_CLEAR_IF_FIRST, read_only?O_RDONLY:O_RDWR|O_CREAT, 0644); if (!lock_db) { diff --git a/source/utils/net_idmap.c b/source/utils/net_idmap.c index 2a060d2..7ac2a82 100644 --- a/source/utils/net_idmap.c +++ b/source/utils/net_idmap.c @@ -284,6 +284,70 @@ int net_help_idmap(int argc, const char **argv) return -1; } +static int net_idmap_aclmapset(int argc, const char **argv) +{ + TALLOC_CTX *mem_ctx; + int result = -1; + DOM_SID src_sid, dst_sid; + char *src, *dst; + struct db_context *db; + struct db_record *rec; + NTSTATUS status; + + if (argc != 3) { +
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-1308-g3f2d12c
The branch, v4-0-test has been updated via 3f2d12c61e95475009baf77c3e0fbea2abecc17a (commit) via c84e3abae9781c0cbea5fee00bafe70967fb6468 (commit) via 9196213c49532ac60349ff55e66430b7c80b09c2 (commit) via 61a87bed61ef661d98131239976be95c6a8b4d96 (commit) from f14737e4d2040d2f401a3b20c5e78d0d793cfc3a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit 3f2d12c61e95475009baf77c3e0fbea2abecc17a Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Mon Mar 17 12:11:44 2008 +0100 RAW-BENCH-OPEN: avoid sync calls before the main loop On multi cpu machines the server may reply to the first requests while the test is still in setup mode. Now we setup the first opens, but send them all together when entering the main loop. metze commit c84e3abae9781c0cbea5fee00bafe70967fb6468 Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Mon Mar 17 09:59:30 2008 +0100 RAW-BENCH-OPEN: fix the output and calculate the total operations metze commit 9196213c49532ac60349ff55e66430b7c80b09c2 Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Mon Mar 17 15:17:19 2008 +0100 selftest: handle progress output in verbose mode metze commit 61a87bed61ef661d98131239976be95c6a8b4d96 Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Mon Mar 17 14:08:57 2008 +0100 socket_wrapper: make pcap code more portable Now the pcap support works on x86_64. metze --- Summary of changes: source/lib/socket_wrapper/socket_wrapper.c | 79 ++-- source/selftest/Subunit.pm | 29 +++- source/selftest/output/plain.pm|4 +- source/selftest/selftest.pl|2 +- source/torture/raw/openbench.c | 112 ++-- 5 files changed, 143 insertions(+), 83 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/socket_wrapper/socket_wrapper.c b/source/lib/socket_wrapper/socket_wrapper.c index 644365a..86d9f7a 100644 --- a/source/lib/socket_wrapper/socket_wrapper.c +++ b/source/lib/socket_wrapper/socket_wrapper.c @@ -64,6 +64,7 @@ #include unistd.h #include string.h #include stdio.h +#include stdint.h #endif @@ -624,67 +625,67 @@ enum swrap_packet_type { }; struct swrap_file_hdr { - unsigned long magic; - unsigned short version_major; - unsigned short version_minor; - longtimezone; - unsigned long sigfigs; - unsigned long frame_max_len; + uint32_tmagic; + uint16_tversion_major; + uint16_tversion_minor; + int32_t timezone; + uint32_tsigfigs; + uint32_tframe_max_len; #define SWRAP_FRAME_LENGTH_MAX 0x - unsigned long link_type; + uint32_tlink_type; }; #define SWRAP_FILE_HDR_SIZE 24 struct swrap_packet { struct { - unsigned long seconds; - unsigned long micro_seconds; - unsigned long recorded_length; - unsigned long full_length; + uint32_t seconds; + uint32_t micro_seconds; + uint32_t recorded_length; + uint32_t full_length; } frame; #define SWRAP_PACKET__FRAME_SIZE 16 struct { struct { - unsigned char ver_hdrlen; - unsigned char tos; - unsigned short packet_length; - unsigned short identification; - unsigned char flags; - unsigned char fragment; - unsigned char ttl; - unsigned char protocol; - unsigned short hdr_checksum; - unsigned long src_addr; - unsigned long dest_addr; + uint8_t ver_hdrlen; + uint8_t tos; + uint16_tpacket_length; + uint16_tidentification; + uint8_t flags; + uint8_t fragment; + uint8_t ttl; + uint8_t protocol; + uint16_thdr_checksum; + uint32_tsrc_addr; + uint32_tdest_addr; } hdr; #define SWRAP_PACKET__IP_HDR_SIZE 20 union { struct { - unsigned short source_port; - unsigned short dest_port; - unsigned long seq_num; - unsigned long ack_num; -
[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-282-g38eab68
The branch, v3-2-test has been updated via 38eab68dfb2d8abe8ad00f5a86fc54c778d0d303 (commit) from 065938ccb7bb0052746267c433637f0e05b95d85 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 38eab68dfb2d8abe8ad00f5a86fc54c778d0d303 Author: Derrell Lipman [EMAIL PROTECTED] Date: Mon Mar 17 11:34:25 2008 -0400 Fix use of AuthDataWithContext capability During my initial plans for, and the subsequent discussion of a more significant change to the API for libsmbclient, I had removed the AuthDataWithContext usage, in favor of a more generalized planned interface. When the API returned to its original state, I neglected to reinsert this code. Use of an authentication function with the context can be tested using examples/libsmbclient/testbrowse -C Derrell --- Summary of changes: source/libsmb/libsmb_context.c |3 ++- source/libsmb/libsmb_server.c | 22 ++ 2 files changed, 20 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libsmb/libsmb_context.c b/source/libsmb/libsmb_context.c index 3e67943..dd78bce 100644 --- a/source/libsmb/libsmb_context.c +++ b/source/libsmb/libsmb_context.c @@ -421,7 +421,8 @@ smbc_init_context(SMBCCTX *context) return NULL; } -if (!smbc_getFunctionAuthData(context) || +if ((!smbc_getFunctionAuthData(context) + !smbc_getFunctionAuthDataWithContext(context)) || smbc_getDebug(context) 0 || smbc_getDebug(context) 100) { diff --git a/source/libsmb/libsmb_server.c b/source/libsmb/libsmb_server.c index 37612c6..7af5ca3 100644 --- a/source/libsmb/libsmb_server.c +++ b/source/libsmb/libsmb_server.c @@ -101,15 +101,29 @@ SMBC_call_auth_fn(TALLOC_CTX *ctx, fstring workgroup; fstring username; fstring password; +smbc_get_auth_data_with_context_fn auth_with_context_fn; strlcpy(workgroup, *pp_workgroup, sizeof(workgroup)); strlcpy(username, *pp_username, sizeof(username)); strlcpy(password, *pp_password, sizeof(password)); -smbc_getFunctionAuthData(context)(server, share, - workgroup, sizeof(workgroup), - username, sizeof(username), - password, sizeof(password)); +/* See if there's an authentication with context function provided */ +auth_with_context_fn = smbc_getFunctionAuthDataWithContext(context); +if (auth_with_context_fn) +{ +(* auth_with_context_fn)(context, + server, share, + workgroup, sizeof(workgroup), + username, sizeof(username), + password, sizeof(password)); +} +else +{ +smbc_getFunctionAuthData(context)(server, share, + workgroup, sizeof(workgroup), + username, sizeof(username), + password, sizeof(password)); +} TALLOC_FREE(*pp_workgroup); TALLOC_FREE(*pp_username); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-283-gc22204a
The branch, v3-2-test has been updated via c22204aa85d4bb33534b6974dcfed9aad0c28cc4 (commit) from 38eab68dfb2d8abe8ad00f5a86fc54c778d0d303 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit c22204aa85d4bb33534b6974dcfed9aad0c28cc4 Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Mon Mar 17 14:08:57 2008 +0100 socket_wrapper: make pcap code more portable Now the pcap support works on x86_64. metze (cherry picked from commit 61a87bed61ef661d98131239976be95c6a8b4d96) --- Summary of changes: source/lib/socket_wrapper/socket_wrapper.c | 79 ++-- 1 files changed, 40 insertions(+), 39 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/socket_wrapper/socket_wrapper.c b/source/lib/socket_wrapper/socket_wrapper.c index 5b8052e..c0a7c16 100644 --- a/source/lib/socket_wrapper/socket_wrapper.c +++ b/source/lib/socket_wrapper/socket_wrapper.c @@ -71,6 +71,7 @@ #include unistd.h #include string.h #include stdio.h +#include stdint.h #define _PUBLIC_ @@ -499,67 +500,67 @@ enum swrap_packet_type { }; struct swrap_file_hdr { - unsigned long magic; - unsigned short version_major; - unsigned short version_minor; - longtimezone; - unsigned long sigfigs; - unsigned long frame_max_len; + uint32_tmagic; + uint16_tversion_major; + uint16_tversion_minor; + int32_t timezone; + uint32_tsigfigs; + uint32_tframe_max_len; #define SWRAP_FRAME_LENGTH_MAX 0x - unsigned long link_type; + uint32_tlink_type; }; #define SWRAP_FILE_HDR_SIZE 24 struct swrap_packet { struct { - unsigned long seconds; - unsigned long micro_seconds; - unsigned long recorded_length; - unsigned long full_length; + uint32_t seconds; + uint32_t micro_seconds; + uint32_t recorded_length; + uint32_t full_length; } frame; #define SWRAP_PACKET__FRAME_SIZE 16 struct { struct { - unsigned char ver_hdrlen; - unsigned char tos; - unsigned short packet_length; - unsigned short identification; - unsigned char flags; - unsigned char fragment; - unsigned char ttl; - unsigned char protocol; - unsigned short hdr_checksum; - unsigned long src_addr; - unsigned long dest_addr; + uint8_t ver_hdrlen; + uint8_t tos; + uint16_tpacket_length; + uint16_tidentification; + uint8_t flags; + uint8_t fragment; + uint8_t ttl; + uint8_t protocol; + uint16_thdr_checksum; + uint32_tsrc_addr; + uint32_tdest_addr; } hdr; #define SWRAP_PACKET__IP_HDR_SIZE 20 union { struct { - unsigned short source_port; - unsigned short dest_port; - unsigned long seq_num; - unsigned long ack_num; - unsigned char hdr_length; - unsigned char control; - unsigned short window; - unsigned short checksum; - unsigned short urg; + uint16_tsource_port; + uint16_tdest_port; + uint32_tseq_num; + uint32_tack_num; + uint8_t hdr_length; + uint8_t control; + uint16_twindow; + uint16_tchecksum; + uint16_turg; } tcp; #define SWRAP_PACKET__IP_P_TCP_SIZE 20 struct { - unsigned short source_port; - unsigned short dest_port; - unsigned short length; - unsigned short checksum; + uint16_t
[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-285-g097af03
The branch, v3-2-test has been updated via 097af0309d7c3e9342058ba527293b23c80d (commit) via 5315ef41f403b96715dd68b512e9e74662e2910a (commit) from c22204aa85d4bb33534b6974dcfed9aad0c28cc4 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 097af0309d7c3e9342058ba527293b23c80d Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 18:01:33 2008 +0100 libsmbconf: rename all occurrences of libnet_conf_ to smbconf_ . Michael commit 5315ef41f403b96715dd68b512e9e74662e2910a Author: Michael Adam [EMAIL PROTECTED] Date: Mon Mar 17 17:29:44 2008 +0100 Move libnet_conf to a library lib/smbconf/ of its own, fixing the api. The libnet_conf code to access the registry based configuration has become more of a library used in several places in samba (e.g. loadparm) than an abstraction of net conf. So I move it to a location lib/smbconf/. In the same breath, the api is fixed (not generated by make proto anymore). Michael --- Summary of changes: source/Makefile.in |9 +- source/include/includes.h |2 + source/lib/netapi/serverinfo.c | 11 +- .../libnet_conf.c = lib/smbconf/smbconf.c}| 295 ++-- source/lib/smbconf/smbconf.h | 73 + source/libnet/libnet.h |1 - source/libnet/libnet_conf.h| 27 -- source/libnet/libnet_join.c| 34 ++-- source/param/loadparm.c| 16 +- source/utils/net_conf.c| 94 +++ 10 files changed, 299 insertions(+), 263 deletions(-) rename source/{libnet/libnet_conf.c = lib/smbconf/smbconf.c} (70%) create mode 100644 source/lib/smbconf/smbconf.h delete mode 100644 source/libnet/libnet_conf.h Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index 4fa44aa..5934db1 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -364,7 +364,7 @@ READLINE_OBJ = lib/readline.o POPT_LIB_OBJ = lib/popt_common.o PARAM_WITHOUT_REG_OBJ = dynconfig.o param/loadparm.o param/params.o param/util.o lib/sharesec.o lib/ldap_debug_handler.o -PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBNET_CONF_OBJ) $(PRIVILEGES_BASIC_OBJ) +PARAM_REG_ADD_OBJ = $(REG_SMBCONF_OBJ) $(LIBSMBCONF_OBJ) $(PRIVILEGES_BASIC_OBJ) PARAM_OBJ = $(PARAM_WITHOUT_REG_OBJ) $(PARAM_REG_ADD_OBJ) KRBCLIENT_OBJ = libads/kerberos.o libads/ads_status.o @@ -670,6 +670,7 @@ SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \ $(LIBADS_OBJ) $(KRBCLIENT_OBJ) $(LIBADS_SERVER_OBJ) \ $(REG_FULL_OBJ) $(POPT_LIB_OBJ) $(BUILDOPT_OBJ) \ $(SMBLDAP_OBJ) $(LDB_OBJ) $(LIBNET_OBJ) @LIBWBCLIENT_STATIC@ \ + $(LIBSMBCONF_OBJ) \ $(PRIVILEGES_BASIC_OBJ) PRINTING_OBJ = printing/pcap.o printing/print_svid.o printing/print_aix.o \ @@ -816,6 +817,7 @@ LIBNETAPI_OBJ1 = lib/netapi/netapi.o \ lib/netapi/getdc.o LIBNETAPI_OBJ = $(LIBNETAPI_OBJ1) $(LIBNET_OBJ) \ +$(LIBSMBCONF_OBJ) \ $(REG_SMBCONF_OBJ) \ $(PARAM_WITHOUT_REG_OBJ) $(LIB_NONSMBD_OBJ) \ $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) \ @@ -823,9 +825,9 @@ LIBNETAPI_OBJ = $(LIBNETAPI_OBJ1) $(LIBNET_OBJ) \ $(SECRETS_OBJ) $(PASSDB_OBJ) @LIBWBCLIENT_STATIC@ $(SMBLDAP_OBJ) $(GROUPDB_OBJ) $(LDB_OBJ) \ $(DCUTIL_OBJ) $(LIBADS_OBJ) $(PRIVILEGES_BASIC_OBJ) -LIBNET_CONF_OBJ = libnet/libnet_conf.o +LIBSMBCONF_OBJ = lib/smbconf/smbconf.o -LIBNET_OBJ = $(LIBNET_CONF_OBJ) libnet/libnet_join.o \ +LIBNET_OBJ = libnet/libnet_join.o \ librpc/gen_ndr/ndr_libnet_join.o NET_OBJ1 = utils/net.o utils/net_ads.o utils/net_help.o \ @@ -848,6 +850,7 @@ NET_OBJ = $(NET_OBJ1) $(PARAM_WITHOUT_REG_OBJ) $(SECRETS_OBJ) $(LIBSMB_OBJ) \ $(AFS_OBJ) $(AFS_SETTOKEN_OBJ) $(READLINE_OBJ) \ $(LDB_OBJ) $(LIBGPO_OBJ) @BUILD_INIPARSER@ $(DISPLAY_SEC_OBJ) \ $(REG_SMBCONF_OBJ) @LIBNETAPI_STATIC@ $(LIBNET_OBJ) \ + $(LIBSMBCONF_OBJ) \ $(WBCOMMON_OBJ) @LIBWBCLIENT_STATIC@ \ $(PRIVILEGES_BASIC_OBJ) diff --git a/source/include/includes.h b/source/include/includes.h index 36c71d7..c56c3cf 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -726,6 +726,8 @@ typedef char fstring[FSTRING_LEN]; #include async_req.h #include async_smb.h +#include lib/smbconf/smbconf.h + /* used in net.c */ struct functable { const char *funcname; diff --git a/source/lib/netapi/serverinfo.c b/source/lib/netapi/serverinfo.c index d30e7d9..a29a840 100644 --- a/source/lib/netapi/serverinfo.c +++
[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-287-gb59b436
The branch, v3-2-test has been updated via b59b436997fba47afd02ffb6f1194dfaef229d44 (commit) via 3fc85d22590550f0539215d020e4411bf5b14363 (commit) from 097af0309d7c3e9342058ba527293b23c80d (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit b59b436997fba47afd02ffb6f1194dfaef229d44 Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Mar 17 21:00:16 2008 +0100 Some simplifications commit 3fc85d22590550f0539215d020e4411bf5b14363 Author: Marc VanHeyningen [EMAIL PROTECTED] Date: Fri Mar 14 14:26:28 2008 -0800 Coverity fixes --- Summary of changes: source/client/client.c |5 - source/include/rpc_client.h| 12 source/lib/sock_exec.c |2 +- source/libads/kerberos.c |6 -- source/libads/krb5_setpw.c | 17 ++--- source/libads/ldap.c |5 - source/nsswitch/wins.c | 10 -- source/passdb/pdb_ldap.c | 14 ++ source/passdb/pdb_smbpasswd.c |6 -- source/printing/nt_printing.c | 31 +++ source/registry/reg_backend_printing.c |3 ++- source/registry/regfio.c |5 - source/rpc_client/cli_pipe.c | 23 +-- source/rpc_client/ndr.c|5 + source/rpc_parse/parse_buffer.c|6 -- source/rpc_parse/parse_misc.c | 27 ++- source/rpc_parse/parse_prs.c |2 +- source/rpc_server/srv_pipe.c | 16 source/rpc_server/srv_pipe_hnd.c |6 +++--- source/rpc_server/srv_spoolss_nt.c |6 +- source/rpc_server/srv_winreg_nt.c |6 -- source/services/services_db.c |7 ++- source/smbd/notify.c |2 +- source/smbd/uid.c |8 +++- source/utils/net_rpc.c |7 +-- source/utils/rpccheck.c|3 ++- source/utils/smbget.c |7 ++- 27 files changed, 162 insertions(+), 85 deletions(-) Changeset truncated at 500 lines: diff --git a/source/client/client.c b/source/client/client.c index a285bcc..0b4438d 100644 --- a/source/client/client.c +++ b/source/client/client.c @@ -4899,7 +4899,10 @@ static int do_message_op(void) } smb_encrypt = get_cmdline_auth_info_smb_encrypt(); - init_names(); + if (!init_names()) { + fprintf(stderr, init_names() failed\n); + exit(1); + } if(new_name_resolve_order) lp_set_name_resolve_order(new_name_resolve_order); diff --git a/source/include/rpc_client.h b/source/include/rpc_client.h index e1ebb25..c552271 100644 --- a/source/include/rpc_client.h +++ b/source/include/rpc_client.h @@ -36,6 +36,8 @@ #include librpc/gen_ndr/cli_dssetup.h #include librpc/gen_ndr/cli_ntsvcs.h +#define prs_init_empty( _ps_, _ctx_, _io_ ) (void) prs_init((_ps_), 0, (_ctx_), (_io_)) + /* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */ #define CLI_DO_RPC_INTERNAL( pcli, ctx, p_idx, opnum, q_in, r_out, \ @@ -45,10 +47,7 @@ if (!prs_init( q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ return NT_STATUS_NO_MEMORY;\ }\ - if (!prs_init( r_ps, 0, ctx, UNMARSHALL )) {\ - prs_mem_free( q_ps );\ - return NT_STATUS_NO_MEMORY;\ - }\ + prs_init_empty( r_ps, ctx, UNMARSHALL );\ if ( copy_sess_key) prs_set_session_key(q_ps, (const char *)pcli-dc-sess_key);\ if ( q_io_fn(, q_in, q_ps, 0) ) {\ NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, q_ps, r_ps); \ @@ -96,10 +95,7 @@ if (!prs_init( q_ps, RPC_MAX_PDU_FRAG_LEN, ctx, MARSHALL )) { \ return WERR_NOMEM;\ }\ - if (!prs_init( r_ps, 0, ctx, UNMARSHALL )) {\ - prs_mem_free( q_ps );\ - return WERR_NOMEM;\ - }\ + prs_init_empty( r_ps, ctx, UNMARSHALL );\ if ( q_io_fn(, q_in, q_ps, 0) ) {\ NTSTATUS _smb_pipe_stat_ = rpc_api_pipe_req(pcli, opnum, q_ps, r_ps); \ if (!NT_STATUS_IS_OK(_smb_pipe_stat_)) {\ diff --git a/source/lib/sock_exec.c b/source/lib/sock_exec.c index 278a174..2333d7c 100644 --- a/source/lib/sock_exec.c +++ b/source/lib/sock_exec.c @@ -48,7 +48,7 @@ static int socketpair_tcp(int fd[2]) #endif sock2.sin_family = PF_INET; -bind(listener, (struct sockaddr *)sock2, sizeof(sock2)); +if (bind(listener, (struct sockaddr *)sock2, sizeof(sock2)) != 0) goto failed; if (listen(listener, 1) != 0) goto failed; diff --git
Build status as of Tue Mar 18 00:00:02 2008
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2008-03-17 00:00:26.0 + +++ /home/build/master/cache/broken_results.txt 2008-03-18 00:00:35.0 + @@ -1,4 +1,4 @@ -Build status as of Mon Mar 17 00:00:01 2008 +Build status as of Tue Mar 18 00:00:02 2008 Build counts: Tree Total Broken Panic @@ -11,11 +11,11 @@ lorikeet-heimdal 23 19 0 pidl 17 4 0 ppp 10 0 0 -rsync30 16 0 +rsync30 13 0 samba-docs 0 0 0 samba-gtk4 4 0 samba_3_2_test 29 25 0 -samba_4_0_test 27 23 0 +samba_4_0_test 27 26 0 smb-build28 3 0 talloc 30 8 0 tdb 30 14 0
svn commit: lorikeet r788 - in trunk/heimdal/lib/hcrypto: .
Author: abartlet Date: 2008-03-18 00:36:03 + (Tue, 18 Mar 2008) New Revision: 788 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=lorikeetrev=788 Log: Change to the GPL, rather than looks-like-BSD licenced versions of the camellia cypher. Downloaded from http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/camellia-GPL-1.2.0.tar.gz Andrew Bartlett Modified: trunk/heimdal/lib/hcrypto/camellia-ntt.c trunk/heimdal/lib/hcrypto/camellia-ntt.h Changeset: Modified: trunk/heimdal/lib/hcrypto/camellia-ntt.c === --- trunk/heimdal/lib/hcrypto/camellia-ntt.c2008-03-13 05:39:49 UTC (rev 787) +++ trunk/heimdal/lib/hcrypto/camellia-ntt.c2008-03-18 00:36:03 UTC (rev 788) @@ -1,28 +1,21 @@ -/* camellia.c ver 1.2.0 +/* camellia.h ver 1.2.0 * - * Copyright (c) 2006,2007 - * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. + * Copyright (C) 2006,2007 + * NTT (Nippon Telegraph and Telephone Corporation). * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer as - * the first lines of this file unmodified. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * - * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* @@ -30,15 +23,13 @@ * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html */ - #include string.h #include stdlib.h -#include krb5-types.h -#include camellia-ntt.h +#include camellia.h /* u32 must be 32bit word */ -typedef uint32_t u32; +typedef unsigned int u32; typedef unsigned char u8; /* key constants */ @@ -453,7 +444,7 @@ #define subl(x) subL[(x)] #define subr(x) subR[(x)] -static void camellia_setup128(const unsigned char *key, u32 *subkey) +void camellia_setup128(const unsigned char *key, u32 *subkey) { u32 kll, klr, krl, krr; u32 il, ir, t0, t1, w0, w1; @@ -664,7 +655,7 @@ return; } -static void camellia_setup256(const unsigned char *key, u32 *subkey) +void camellia_setup256(const unsigned char *key, u32 *subkey) { u32 kll,klr,krl,krr; /* left half of key */ u32 krll,krlr,krrl,krrr; /* right half of key */ @@ -950,7 +941,7 @@ return; } -static void camellia_setup192(const unsigned char *key, u32 *subkey) +void camellia_setup192(const unsigned char *key, u32 *subkey) { unsigned char kk[32]; u32 krll, krlr, krrl,krrr; @@ -972,7 +963,7 @@ * * io must be 4byte aligned and big-endian data. */ -static void camellia_encrypt128(const u32 *subkey, u32 *io) +void camellia_encrypt128(const u32 *subkey, u32 *io) { u32 il, ir, t0, t1; @@ -1062,7 +1053,7 @@ return; } -static void camellia_decrypt128(const u32 *subkey, u32 *io) +void camellia_decrypt128(const u32 *subkey, u32 *io) { u32 il,ir,t0,t1; /* temporary valiables */ @@ -1155,7 +1146,7 @@ /** * stuff for 192 and 256bit encryption/decryption */ -static void camellia_encrypt256(const u32 *subkey, u32 *io) +void camellia_encrypt256(const u32 *subkey, u32 *io) { u32 il,ir,t0,t1; /* temporary valiables */ @@ -1269,7 +1260,7 @@ return; } -static void camellia_decrypt256(const u32
svn commit: lorikeet r789 - in trunk/heimdal/lib/hcrypto: .
Author: abartlet Date: 2008-03-18 01:02:30 + (Tue, 18 Mar 2008) New Revision: 789 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=lorikeetrev=789 Log: Bring in krb5-types into camellia.h (and therefore into camellia-ntt.[ch]) Andrew Bartlett Modified: trunk/heimdal/lib/hcrypto/camellia.h Changeset: Modified: trunk/heimdal/lib/hcrypto/camellia.h === --- trunk/heimdal/lib/hcrypto/camellia.h2008-03-18 00:36:03 UTC (rev 788) +++ trunk/heimdal/lib/hcrypto/camellia.h2008-03-18 01:02:30 UTC (rev 789) @@ -36,6 +36,7 @@ #ifndef HEIM_CAMELLIA_H #define HEIM_CAMELLIA_H 1 +#include krb5-types.h #include camellia-ntt.h /* symbol renaming */
svn commit: lorikeet r790 - in trunk/heimdal: .
Author: abartlet Date: 2008-03-18 01:10:15 + (Tue, 18 Mar 2008) New Revision: 790 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=lorikeetrev=790 Log: This patch looks *really* odd, but this is due to pulling in the GPL, rather than BSD-like licence for the camellia cypher from http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/camellia-GPL-1.2.0.tar.gz Andrew Bartlett Modified: trunk/heimdal/heimdal-lorikeet.diff Changeset: Modified: trunk/heimdal/heimdal-lorikeet.diff === --- trunk/heimdal/heimdal-lorikeet.diff 2008-03-18 01:02:30 UTC (rev 789) +++ trunk/heimdal/heimdal-lorikeet.diff 2008-03-18 01:10:15 UTC (rev 790) @@ -87,3 +87,186 @@ tmp_principal, rep-kdc_rep.cname, rep-kdc_rep.crealm); +--- /data/heimdal-svn/lib/hcrypto/camellia.h 2007-08-07 09:21:33.0 +1000 lib/hcrypto/camellia.h 2008-03-18 11:37:04.0 +1100 +@@ -36,6 +36,7 @@ + #ifndef HEIM_CAMELLIA_H + #define HEIM_CAMELLIA_H 1 + ++#include krb5-types.h + #include camellia-ntt.h + + /* symbol renaming */ +--- /data/heimdal-svn/lib/hcrypto/camellia-ntt.h 2007-08-07 09:21:33.0 +1000 lib/hcrypto/camellia-ntt.h 2007-01-11 18:27:37.0 +1100 +@@ -1,28 +1,21 @@ +-/* camellia.h ver 1.2.0 ++/* camellia.h ver 1.2.0 + * +- * Copyright (c) 2006,2007 +- * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. ++ * Copyright (C) 2006,2007 ++ * NTT (Nippon Telegraph and Telephone Corporation). + * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer as +- * the first lines of this file unmodified. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. + * +- * THIS SOFTWARE IS PROVIDED BY NTT ``AS IS'' AND ANY EXPRESS OR +- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +- * IN NO EVENT SHALL NTT BE LIABLE FOR ANY DIRECT, INDIRECT, +- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + + #ifndef HEADER_CAMELLIA_H +--- /data/heimdal-svn/lib/hcrypto/camellia-ntt.c 2007-08-07 09:21:33.0 +1000 lib/hcrypto/camellia-ntt.c 2007-01-11 18:28:12.0 +1100 +@@ -1,28 +1,21 @@ +-/* camellia.c ver 1.2.0 ++/* camellia.h ver 1.2.0 + * +- * Copyright (c) 2006,2007 +- * NTT (Nippon Telegraph and Telephone Corporation) . All rights reserved. ++ * Copyright (C) 2006,2007 ++ * NTT (Nippon Telegraph and Telephone Corporation). + * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions +- * are met: +- * 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer as +- * the first lines of this file unmodified. +- * 2. Redistributions in binary form must reproduce the above copyright +- * notice, this list of conditions and the following disclaimer in the +- * documentation and/or other materials provided with the distribution. ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at