Hi, I've compiled /export/testws/usr/src/lib/crypt_modules/sha256/test.c and tried to use it to calculate the checksum of the uberblock. This I did as the sha256 executable that comes with solaris is not giving me the correct values for uberblock.(the output is 64chars whereas zfs output is only 49chars)
Uberblock magic = 0000000000bab10c version = 16 txg = 697 guid_sum = 13079999420161054854 timestamp = 1252581875 UTC = Thu Sep 10 16:54:35 2009 so, I got that part of uberblock using 'dd' into another file. I'm opening this file and reading the contents in test.c as follows: char *buf; fp=fopen("/root/ub_dump","rb"); fseek(fp,0,SEEK_END); len=ftell(fp); fseek(fp,0,SEEK_SET); buf=(char *)malloc(len); then, calling res = crypt_genhash_impl(mybuffer, mybufflen, buf, "$5$rounds=123456$asaltof16chars..", NULL); "zdb -uuu charlie" gives me the uberblock checksum as: cksum=112d7c6202:6268950ffa7:1243ab8101197:25779601f5266b but the result from the above modified test.c is not same as this. Can someone point out if my approach is wrong? Thanks, pak -- This message posted from opensolaris.org _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss