Changeset 988 for vendor/current/lib/addns
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- Location:
- vendor/current/lib/addns
- Files:
-
- 2 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/addns/dns.h
r740 r988 28 28 #include "../replace/replace.h" 29 29 #include "system/network.h" 30 #include "system/kerberos.h" 31 #include "system/gssapi.h" 30 32 31 33 /* make sure we have included the correct config.h */ … … 37 39 #endif /* NO_CONFIG_H */ 38 40 39 #include <stdio.h>40 #include <stdlib.h>41 41 #include <fcntl.h> 42 42 #include <time.h> 43 #include <string.h>44 #include <errno.h>45 43 #include <netdb.h> 46 #include <sys/types.h>47 #include <sys/socket.h>48 #include <netinet/in.h>49 #include <arpa/inet.h>50 #include <stdarg.h>51 52 #ifdef HAVE_UUID_UUID_H53 #include <uuid/uuid.h>54 #endif55 56 #ifdef HAVE_KRB5_H57 #include <krb5.h>58 #endif59 60 #ifdef HAVE_INTTYPES_H61 #include <inttypes.h>62 63 #ifndef int1664 #define int16 int16_t65 #endif66 67 #ifndef uint1668 #define uint16 uint16_t69 #endif70 71 #ifndef int3272 #define int32 int32_t73 #endif74 75 #ifndef uint3276 #define uint32 uint32_t77 #endif78 #endif79 80 #ifdef HAVE_KRB5_H81 #include <krb5.h>82 #endif83 84 #if HAVE_GSSAPI_GSSAPI_H85 #include <gssapi/gssapi.h>86 #elif HAVE_GSSAPI_GSSAPI_GENERIC_H87 #include <gssapi/gssapi_generic.h>88 #elif HAVE_GSSAPI_H89 #include <gssapi.h>90 #endif91 92 #if defined(HAVE_GSSAPI_H) || defined(HAVE_GSSAPI_GSSAPI_H) || defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)93 #define HAVE_GSSAPI_SUPPORT 194 #endif95 44 96 45 #include <talloc.h> 97 98 #if 099 100 Disable these now we have checked all code paths and ensured101 NULL returns on zero request. JRA.102 103 void *_talloc_zero_zeronull(const void *ctx, size_t size, const char *name);104 void *_talloc_memdup_zeronull(const void *t, const void *p, size_t size, const char *name);105 void *_talloc_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);106 void *_talloc_zero_array_zeronull(const void *ctx, size_t el_size, unsigned count, const char *name);107 void *talloc_zeronull(const void *context, size_t size, const char *name);108 109 #define TALLOC(ctx, size) talloc_zeronull(ctx, size, __location__)110 #define TALLOC_P(ctx, type) (type *)talloc_zeronull(ctx, sizeof(type), #type)111 #define TALLOC_ARRAY(ctx, type, count) (type *)_talloc_array_zeronull(ctx, sizeof(type), count, #type)112 #define TALLOC_MEMDUP(ctx, ptr, size) _talloc_memdup_zeronull(ctx, ptr, size, __location__)113 #define TALLOC_ZERO(ctx, size) _talloc_zero_zeronull(ctx, size, __location__)114 #define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero_zeronull(ctx, sizeof(type), #type)115 #define TALLOC_ZERO_ARRAY(ctx, type, count) (type *)_talloc_zero_array_zeronull(ctx, sizeof(type), count, #type)116 #define TALLOC_SIZE(ctx, size) talloc_zeronull(ctx, size, __location__)117 #define TALLOC_ZERO_SIZE(ctx, size) _talloc_zero_zeronull(ctx, size, __location__)118 119 #else120 121 #define TALLOC(ctx, size) talloc_named_const(ctx, size, __location__)122 #define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), #type)123 #define TALLOC_ARRAY(ctx, type, count) (type *)_talloc_array(ctx, sizeof(type), count, #type)124 #define TALLOC_MEMDUP(ctx, ptr, size) _talloc_memdup(ctx, ptr, size, __location__)125 #define TALLOC_ZERO(ctx, size) _talloc_zero(ctx, size, __location__)126 #define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)127 #define TALLOC_ZERO_ARRAY(ctx, type, count) (type *)_talloc_zero_array(ctx, sizeof(type), count, #type)128 #define TALLOC_SIZE(ctx, size) talloc_named_const(ctx, size, __location__)129 #define TALLOC_ZERO_SIZE(ctx, size) _talloc_zero(ctx, size, __location__)130 131 #endif132 133 #define TALLOC_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, __location__)134 #define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type *)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)135 #define talloc_destroy(ctx) talloc_free(ctx)136 #ifndef TALLOC_FREE137 #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)138 #endif139 140 /*******************************************************************141 Type definitions for int16, int32, uint16 and uint32. Needed142 for Samba coding style143 *******************************************************************/144 145 #ifndef uint8146 # define uint8 unsigned char147 #endif148 149 #if !defined(int16) && !defined(HAVE_INT16_FROM_RPC_RPC_H)150 # if (SIZEOF_SHORT == 4)151 # define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;152 # else /* SIZEOF_SHORT != 4 */153 # define int16 short154 # endif /* SIZEOF_SHORT != 4 */155 /* needed to work around compile issue on HP-UX 11.x */156 # define _INT16 1157 #endif158 159 /*160 * Note we duplicate the size tests in the unsigned161 * case as int16 may be a typedef from rpc/rpc.h162 */163 164 #if !defined(uint16) && !defined(HAVE_UINT16_FROM_RPC_RPC_H)165 # if (SIZEOF_SHORT == 4)166 # define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;167 # else /* SIZEOF_SHORT != 4 */168 # define uint16 unsigned short169 # endif /* SIZEOF_SHORT != 4 */170 #endif171 172 #if !defined(int32) && !defined(HAVE_INT32_FROM_RPC_RPC_H)173 # if (SIZEOF_INT == 4)174 # define int32 int175 # elif (SIZEOF_LONG == 4)176 # define int32 long177 # elif (SIZEOF_SHORT == 4)178 # define int32 short179 # else180 /* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */181 # define int32 int182 # endif183 # ifndef _INT32184 /* needed to work around compile issue on HP-UX 11.x */185 # define _INT32 1186 # endif187 #endif188 189 /*190 * Note we duplicate the size tests in the unsigned191 * case as int32 may be a typedef from rpc/rpc.h192 */193 194 #if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H)195 # if (SIZEOF_INT == 4)196 # define uint32 unsigned int197 # elif (SIZEOF_LONG == 4)198 # define uint32 unsigned long199 # elif (SIZEOF_SHORT == 4)200 # define uint32 unsigned short201 # else202 /* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */203 # define uint32 unsigned204 # endif205 #endif206 207 /*208 * check for 8 byte long long209 */210 211 #if !defined(uint64)212 # if (SIZEOF_LONG == 8)213 # define uint64 unsigned long214 # elif (SIZEOF_LONG_LONG == 8)215 # define uint64 unsigned long long216 # endif /* don't lie. If we don't have it, then don't use it */217 #endif218 219 /* needed on Sun boxes */220 #ifndef INADDR_NONE221 #define INADDR_NONE 0xFFFFFFFF222 #endif223 46 224 47 #include "dnserr.h" … … 248 71 #define QTYPE_CNAME 5 249 72 #define QTYPE_SOA 6 73 #define QTYPE_AAAA 28 250 74 #define QTYPE_ANY 255 251 75 #define QTYPE_TKEY 249 … … 329 153 struct dns_question { 330 154 struct dns_domain_name *name; 331 uint16 q_type;332 uint16 q_class;155 uint16_t q_type; 156 uint16_t q_class; 333 157 }; 334 158 … … 341 165 struct dns_zone { 342 166 struct dns_domain_name *name; 343 uint16 z_type;344 uint16 z_class;167 uint16_t z_type; 168 uint16_t z_class; 345 169 }; 346 170 347 171 struct dns_rrec { 348 172 struct dns_domain_name *name; 349 uint16 type;350 uint16 r_class;351 uint32 ttl;352 uint16 data_length;353 uint8 *data;173 uint16_t type; 174 uint16_t r_class; 175 uint32_t ttl; 176 uint16_t data_length; 177 uint8_t *data; 354 178 }; 355 179 … … 358 182 time_t inception; 359 183 time_t expiration; 360 uint16 mode;361 uint16 error;362 uint16 key_length;363 uint8 *key;184 uint16_t mode; 185 uint16_t error; 186 uint16_t key_length; 187 uint8_t *key; 364 188 }; 365 189 366 190 struct dns_request { 367 uint16 id;368 uint16 flags;369 uint16 num_questions;370 uint16 num_answers;371 uint16 num_auths;372 uint16 num_additionals;191 uint16_t id; 192 uint16_t flags; 193 uint16_t num_questions; 194 uint16_t num_answers; 195 uint16_t num_auths; 196 uint16_t num_additionals; 373 197 struct dns_question **questions; 374 198 struct dns_rrec **answers; … … 384 208 385 209 struct dns_update_request { 386 uint16 id;387 uint16 flags;388 uint16 num_zones;389 uint16 num_preqs;390 uint16 num_updates;391 uint16 num_additionals;210 uint16_t id; 211 uint16_t flags; 212 uint16_t num_zones; 213 uint16_t num_preqs; 214 uint16_t num_updates; 215 uint16_t num_additionals; 392 216 struct dns_zone **zones; 393 217 struct dns_rrec **preqs; … … 397 221 398 222 struct dns_connection { 399 int32 hType;223 int32_t hType; 400 224 int s; 401 struct sockaddr RecvAddr;225 struct sockaddr_storage RecvAddr; 402 226 }; 403 227 404 228 struct dns_buffer { 405 uint8 *data;229 uint8_t *data; 406 230 size_t size; 407 231 size_t offset; … … 419 243 420 244 DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name, 421 uint16 q_type, uint16q_class,245 uint16_t q_type, uint16_t q_class, 422 246 struct dns_request **preq ); 423 247 DNS_ERROR dns_create_update( TALLOC_CTX *mem_ctx, const char *name, … … 428 252 struct dns_update_request **preq); 429 253 DNS_ERROR dns_create_rrec(TALLOC_CTX *mem_ctx, const char *name, 430 uint16 type, uint16 r_class, uint32ttl,431 uint16 data_length, uint8*data,254 uint16_t type, uint16_t r_class, uint32_t ttl, 255 uint16_t data_length, uint8_t *data, 432 256 struct dns_rrec **prec); 433 257 DNS_ERROR dns_add_rrec(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, 434 uint16 *num_records, struct dns_rrec ***records);258 uint16_t *num_records, struct dns_rrec ***records); 435 259 DNS_ERROR dns_create_tkey_record(TALLOC_CTX *mem_ctx, const char *keyname, 436 260 const char *algorithm_name, time_t inception, 437 time_t expiration, uint16 mode, uint16error,438 uint16 key_length, const uint8*key,261 time_t expiration, uint16_t mode, uint16_t error, 262 uint16_t key_length, const uint8_t *key, 439 263 struct dns_rrec **prec); 440 264 DNS_ERROR dns_create_name_in_use_record(TALLOC_CTX *mem_ctx, … … 443 267 struct dns_rrec **prec); 444 268 DNS_ERROR dns_create_delete_record(TALLOC_CTX *mem_ctx, const char *name, 445 uint16 type, uint16r_class,269 uint16_t type, uint16_t r_class, 446 270 struct dns_rrec **prec); 447 271 DNS_ERROR dns_create_name_not_in_use_record(TALLOC_CTX *mem_ctx, 448 const char *name, uint32 type,272 const char *name, uint32_t type, 449 273 struct dns_rrec **prec); 450 274 DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host, 451 uint32 ttl, const struct sockaddr_storage *pss,275 uint32_t ttl, const struct sockaddr_storage *pss, 452 276 struct dns_rrec **prec); 277 DNS_ERROR dns_create_aaaa_record(TALLOC_CTX *mem_ctx, const char *host, 278 uint32_t ttl, const struct sockaddr_storage *pss, 279 struct dns_rrec **prec); 453 280 DNS_ERROR dns_unmarshall_tkey_record(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, 454 281 struct dns_tkey_record **ptkey); 455 282 DNS_ERROR dns_create_tsig_record(TALLOC_CTX *mem_ctx, const char *keyname, 456 283 const char *algorithm_name, 457 time_t time_signed, uint16 fudge,458 uint16 mac_length, const uint8*mac,459 uint16 original_id, uint16error,284 time_t time_signed, uint16_t fudge, 285 uint16_t mac_length, const uint8_t *mac, 286 uint16_t original_id, uint16_t error, 460 287 struct dns_rrec **prec); 461 288 DNS_ERROR dns_add_rrec(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, 462 uint16 *num_records, struct dns_rrec ***records);289 uint16_t *num_records, struct dns_rrec ***records); 463 290 DNS_ERROR dns_create_update_request(TALLOC_CTX *mem_ctx, 464 291 const char *domainname, … … 470 297 /* from dnssock.c */ 471 298 472 DNS_ERROR dns_open_connection( const char *nameserver, int32 dwType,299 DNS_ERROR dns_open_connection( const char *nameserver, int32_t dwType, 473 300 TALLOC_CTX *mem_ctx, 474 301 struct dns_connection **conn ); … … 487 314 488 315 struct dns_buffer *dns_create_buffer(TALLOC_CTX *mem_ctx); 489 void dns_marshall_buffer(struct dns_buffer *buf, const uint8 *data,316 void dns_marshall_buffer(struct dns_buffer *buf, const uint8_t *data, 490 317 size_t len); 491 void dns_marshall_uint16(struct dns_buffer *buf, uint16 val);492 void dns_marshall_uint32(struct dns_buffer *buf, uint32 val);493 void dns_unmarshall_buffer(struct dns_buffer *buf, uint8 *data,318 void dns_marshall_uint16(struct dns_buffer *buf, uint16_t val); 319 void dns_marshall_uint32(struct dns_buffer *buf, uint32_t val); 320 void dns_unmarshall_buffer(struct dns_buffer *buf, uint8_t *data, 494 321 size_t len); 495 void dns_unmarshall_uint16(struct dns_buffer *buf, uint16 *val);496 void dns_unmarshall_uint32(struct dns_buffer *buf, uint32 *val);322 void dns_unmarshall_uint16(struct dns_buffer *buf, uint16_t *val); 323 void dns_unmarshall_uint32(struct dns_buffer *buf, uint32_t *val); 497 324 void dns_unmarshall_domain_name(TALLOC_CTX *mem_ctx, 498 325 struct dns_buffer *buf, … … 517 344 struct dns_request *dns_update2request(struct dns_update_request *update); 518 345 struct dns_update_request *dns_request2update(struct dns_request *request); 519 uint16 dns_response_code(uint16flags);346 uint16_t dns_response_code(uint16_t flags); 520 347 const char *dns_errstr(DNS_ERROR err); 521 348 522 349 /* from dnsgss.c */ 523 350 524 #ifdef HAVE_GSSAPI _SUPPORT351 #ifdef HAVE_GSSAPI 525 352 526 353 void display_status( const char *msg, OM_uint32 maj_stat, OM_uint32 min_stat ); … … 534 361 const char *keyname, 535 362 const char *algorithmname, 536 time_t time_signed, uint16 fudge);537 538 #endif /* HAVE_GSSAPI _SUPPORT*/363 time_t time_signed, uint16_t fudge); 364 365 #endif /* HAVE_GSSAPI */ 539 366 540 367 #endif /* _DNS_H */ -
vendor/current/lib/addns/dnserr.h
r740 r988 37 37 38 38 #if defined(HAVE_IMMEDIATE_STRUCTURES) 39 typedef struct {uint32 v;} DNS_ERROR;39 typedef struct {uint32_t v;} DNS_ERROR; 40 40 #define ERROR_DNS(x) ((DNS_ERROR) { x }) 41 41 #define ERROR_DNS_V(x) ((x).v) 42 42 #else 43 typedef uint32 DNS_ERROR;43 typedef uint32_t DNS_ERROR; 44 44 #define ERROR_DNS(x) (x) 45 45 #define ERROR_DNS_V(x) (x) -
vendor/current/lib/addns/dnsgss.c
r860 r988 27 27 28 28 29 #ifdef HAVE_GSSAPI _SUPPORT29 #ifdef HAVE_GSSAPI 30 30 31 31 /********************************************************************* … … 93 93 94 94 gss_OID_desc krb5_oid_desc = 95 { 9, (char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02"};95 { 9, discard_const("\x2a\x86\x48\x86\xf7\x12\x01\x02\x02") }; 96 96 97 97 *ctx = GSS_C_NO_CONTEXT; … … 126 126 req, keyname, "gss.microsoft.com", t, 127 127 t + 86400, DNS_TKEY_MODE_GSSAPI, 0, 128 output_desc.length, (uint8 *)output_desc.value,128 output_desc.length, (uint8_t *)output_desc.value, 129 129 &rec ); 130 130 if (!ERR_DNS_IS_OK(err)) goto error; … … 231 231 232 232 gss_OID_desc nt_host_oid_desc = 233 {10, (char *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01"};233 {10, discard_const("\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x01")}; 234 234 235 235 TALLOC_CTX *mem_ctx; … … 281 281 const char *keyname, 282 282 const char *algorithmname, 283 time_t time_signed, uint16 fudge)283 time_t time_signed, uint16_t fudge) 284 284 { 285 285 struct dns_buffer *buf; … … 328 328 329 329 err = dns_create_tsig_record(buf, keyname, algorithmname, time_signed, 330 fudge, mic.length, (uint8 *)mic.value,330 fudge, mic.length, (uint8_t *)mic.value, 331 331 req->id, 0, &rec); 332 332 gss_release_buffer(&minor, &mic); … … 340 340 } 341 341 342 #endif /* HAVE_GSSAPI _SUPPORT*/342 #endif /* HAVE_GSSAPI */ -
vendor/current/lib/addns/dnsmarshall.c
r746 r988 40 40 result->size = 2; 41 41 42 if (!(result->data = TALLOC_ZERO_ARRAY(result, uint8, result->size))) {42 if (!(result->data = talloc_zero_array(result, uint8_t, result->size))) { 43 43 TALLOC_FREE(result); 44 44 return NULL; … … 48 48 } 49 49 50 void dns_marshall_buffer(struct dns_buffer *buf, const uint8 *data,50 void dns_marshall_buffer(struct dns_buffer *buf, const uint8_t *data, 51 51 size_t len) 52 52 { … … 71 71 if (buf->offset + len > buf->size) { 72 72 size_t new_size = buf->offset + len; 73 uint8 *new_data;73 uint8_t *new_data; 74 74 75 75 /* … … 79 79 new_size += (64 - (new_size % 64)); 80 80 81 if (!(new_data = TALLOC_REALLOC_ARRAY(buf, buf->data, uint8,81 if (!(new_data = talloc_realloc(buf, buf->data, uint8_t, 82 82 new_size))) { 83 83 buf->error = ERROR_DNS_NO_MEMORY; … … 94 94 } 95 95 96 void dns_marshall_uint16(struct dns_buffer *buf, uint16 val)97 { 98 uint16 n_val = htons(val);99 dns_marshall_buffer(buf, (uint8 *)&n_val, sizeof(n_val));100 } 101 102 void dns_marshall_uint32(struct dns_buffer *buf, uint32 val)103 { 104 uint32 n_val = htonl(val);105 dns_marshall_buffer(buf, (uint8 *)&n_val, sizeof(n_val));106 } 107 108 void dns_unmarshall_buffer(struct dns_buffer *buf, uint8 *data,96 void dns_marshall_uint16(struct dns_buffer *buf, uint16_t val) 97 { 98 uint16_t n_val = htons(val); 99 dns_marshall_buffer(buf, (uint8_t *)&n_val, sizeof(n_val)); 100 } 101 102 void dns_marshall_uint32(struct dns_buffer *buf, uint32_t val) 103 { 104 uint32_t n_val = htonl(val); 105 dns_marshall_buffer(buf, (uint8_t *)&n_val, sizeof(n_val)); 106 } 107 108 void dns_unmarshall_buffer(struct dns_buffer *buf, uint8_t *data, 109 109 size_t len) 110 110 { … … 122 122 } 123 123 124 void dns_unmarshall_uint16(struct dns_buffer *buf, uint16 *val)125 { 126 uint16 n_val;127 128 dns_unmarshall_buffer(buf, (uint8 *)&n_val, sizeof(n_val));124 void dns_unmarshall_uint16(struct dns_buffer *buf, uint16_t *val) 125 { 126 uint16_t n_val; 127 128 dns_unmarshall_buffer(buf, (uint8_t *)&n_val, sizeof(n_val)); 129 129 if (!(ERR_DNS_IS_OK(buf->error))) return; 130 130 … … 132 132 } 133 133 134 void dns_unmarshall_uint32(struct dns_buffer *buf, uint32 *val)135 { 136 uint32 n_val;137 138 dns_unmarshall_buffer(buf, (uint8 *)&n_val, sizeof(n_val));134 void dns_unmarshall_uint32(struct dns_buffer *buf, uint32_t *val) 135 { 136 uint32_t n_val; 137 138 dns_unmarshall_buffer(buf, (uint8_t *)&n_val, sizeof(n_val)); 139 139 if (!(ERR_DNS_IS_OK(buf->error))) return; 140 140 … … 153 153 154 154 for (label = name->pLabelList; label != NULL; label = label->next) { 155 uint8 len = label->len;156 157 dns_marshall_buffer(buf, (uint8 *)&len, sizeof(len));155 uint8_t len = label->len; 156 157 dns_marshall_buffer(buf, (uint8_t *)&len, sizeof(len)); 158 158 if (!ERR_DNS_IS_OK(buf->error)) return; 159 159 160 dns_marshall_buffer(buf, (uint8 *)label->label, len);160 dns_marshall_buffer(buf, (uint8_t *)label->label, len); 161 161 if (!ERR_DNS_IS_OK(buf->error)) return; 162 162 } 163 163 164 dns_marshall_buffer(buf, (uint8 *)&end_char, 1);164 dns_marshall_buffer(buf, (uint8_t *)&end_char, 1); 165 165 } 166 166 … … 171 171 { 172 172 struct dns_domain_label *label; 173 uint8 len;173 uint8_t len; 174 174 175 175 if (!ERR_DNS_IS_OK(buf->error)) return; … … 197 197 */ 198 198 struct dns_buffer new_buf; 199 uint8 low;199 uint8_t low; 200 200 201 201 dns_unmarshall_buffer(buf, &low, sizeof(low)); … … 224 224 label->len = len; 225 225 226 if (!(label->label = TALLOC_ZERO_ARRAY(label, char, len+1))) {226 if (!(label->label = talloc_zero_array(label, char, len+1))) { 227 227 buf->error = ERROR_DNS_NO_MEMORY; 228 228 goto error; 229 229 } 230 230 231 dns_unmarshall_buffer(buf, (uint8 *)label->label, len);231 dns_unmarshall_buffer(buf, (uint8_t *)label->label, len); 232 232 if (!ERR_DNS_IS_OK(buf->error)) goto error; 233 233 … … 330 330 331 331 if (r->data_length != 0) { 332 if (!(r->data = TALLOC_ZERO_ARRAY(r, uint8, r->data_length))) {332 if (!(r->data = talloc_zero_array(r, uint8_t, r->data_length))) { 333 333 buf->error = ERROR_DNS_NO_MEMORY; 334 334 return; … … 347 347 { 348 348 struct dns_buffer *buf; 349 uint16 i;349 uint16_t i; 350 350 351 351 if (!(buf = dns_create_buffer(mem_ctx))) { … … 388 388 { 389 389 struct dns_request *req; 390 uint16 i;390 uint16_t i; 391 391 DNS_ERROR err; 392 392 393 if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_request))) {393 if (!(req = talloc_zero(mem_ctx, struct dns_request))) { 394 394 return ERROR_DNS_NO_MEMORY; 395 395 } … … 407 407 408 408 if ((req->num_questions != 0) && 409 !(req->questions = TALLOC_ZERO_ARRAY(req, struct dns_question *,409 !(req->questions = talloc_zero_array(req, struct dns_question *, 410 410 req->num_questions))) { 411 411 goto error; 412 412 } 413 413 if ((req->num_answers != 0) && 414 !(req->answers = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,414 !(req->answers = talloc_zero_array(req, struct dns_rrec *, 415 415 req->num_answers))) { 416 416 goto error; 417 417 } 418 418 if ((req->num_auths != 0) && 419 !(req->auths = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,419 !(req->auths = talloc_zero_array(req, struct dns_rrec *, 420 420 req->num_auths))) { 421 421 goto error; 422 422 } 423 423 if ((req->num_additionals != 0) && 424 !(req->additionals = TALLOC_ZERO_ARRAY(req, struct dns_rrec *,424 !(req->additionals = talloc_zero_array(req, struct dns_rrec *, 425 425 req->num_additionals))) { 426 426 goto error; … … 525 525 } 526 526 527 uint16 dns_response_code(uint16flags)527 uint16_t dns_response_code(uint16_t flags) 528 528 { 529 529 return flags & 0xF; -
vendor/current/lib/addns/dnsrecord.c
r746 r988 23 23 24 24 #include "dns.h" 25 #include "lib/util/genrand.h" 25 26 26 27 DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name, 27 uint16 q_type, uint16q_class,28 uint16_t q_type, uint16_t q_class, 28 29 struct dns_request **preq ) 29 30 { … … 32 33 DNS_ERROR err; 33 34 34 if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_request)) ||35 !(req->questions = TALLOC_ARRAY(req, struct dns_question *, 1)) ||35 if (!(req = talloc_zero(mem_ctx, struct dns_request)) || 36 !(req->questions = talloc_array(req, struct dns_question *, 1)) || 36 37 !(req->questions[0] = talloc(req->questions, 37 38 struct dns_question))) { … … 40 41 } 41 42 42 req->id = random();43 generate_random_buffer((uint8_t *)&req->id, sizeof(req->id)); 43 44 44 45 req->num_questions = 1; … … 65 66 DNS_ERROR err; 66 67 67 if (!(req = TALLOC_ZERO_P(mem_ctx, struct dns_update_request)) ||68 !(req->zones = TALLOC_ARRAY(req, struct dns_zone *, 1)) ||68 if (!(req = talloc_zero(mem_ctx, struct dns_update_request)) || 69 !(req->zones = talloc_array(req, struct dns_zone *, 1)) || 69 70 !(req->zones[0] = talloc(req->zones, struct dns_zone))) { 70 71 TALLOC_FREE(req); … … 92 93 93 94 DNS_ERROR dns_create_rrec(TALLOC_CTX *mem_ctx, const char *name, 94 uint16 type, uint16 r_class, uint32ttl,95 uint16 data_length, uint8*data,95 uint16_t type, uint16_t r_class, uint32_t ttl, 96 uint16_t data_length, uint8_t *data, 96 97 struct dns_rrec **prec) 97 98 { … … 120 121 121 122 DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host, 122 uint32 ttl, const struct sockaddr_storage *pss,123 uint32_t ttl, const struct sockaddr_storage *pss, 123 124 struct dns_rrec **prec) 124 125 { 125 uint8 *data;126 uint8_t *data; 126 127 DNS_ERROR err; 127 128 struct in_addr ip; 128 129 129 130 if (pss->ss_family != AF_INET) { 130 /* Silently ignore this. */ 131 return ERROR_DNS_SUCCESS; 132 } 133 134 ip = ((struct sockaddr_in *)pss)->sin_addr; 135 if (!(data = (uint8 *)TALLOC_MEMDUP(mem_ctx, (const void *)&ip.s_addr, 131 return ERROR_DNS_INVALID_PARAMETER; 132 } 133 134 ip = ((const struct sockaddr_in *)pss)->sin_addr; 135 if (!(data = (uint8_t *)talloc_memdup(mem_ctx, (const void *)&ip.s_addr, 136 136 sizeof(ip.s_addr)))) { 137 137 return ERROR_DNS_NO_MEMORY; … … 146 146 147 147 return err; 148 } 149 150 DNS_ERROR dns_create_aaaa_record(TALLOC_CTX *mem_ctx, const char *host, 151 uint32_t ttl, const struct sockaddr_storage *pss, 152 struct dns_rrec **prec) 153 { 154 #ifdef HAVE_IPV6 155 uint8_t *data; 156 DNS_ERROR err; 157 struct in6_addr ip6; 158 159 if (pss->ss_family != AF_INET6) { 160 return ERROR_DNS_INVALID_PARAMETER; 161 } 162 163 ip6 = ((const struct sockaddr_in6 *)pss)->sin6_addr; 164 if (!(data = (uint8_t *)talloc_memdup(mem_ctx, (const void *)&ip6.s6_addr, 165 sizeof(ip6.s6_addr)))) { 166 return ERROR_DNS_NO_MEMORY; 167 } 168 169 err = dns_create_rrec(mem_ctx, host, QTYPE_AAAA, DNS_CLASS_IN, ttl, 170 sizeof(ip6.s6_addr), data, prec); 171 172 if (!ERR_DNS_IS_OK(err)) { 173 TALLOC_FREE(data); 174 } 175 176 return err; 177 #else 178 return ERROR_DNS_INVALID_PARAMETER; 179 #endif 148 180 } 149 181 … … 154 186 { 155 187 if (ss != NULL) { 156 return dns_create_a_record(mem_ctx, name, 0, ss, prec); 188 switch (ss->ss_family) { 189 case AF_INET: 190 return dns_create_a_record(mem_ctx, name, 0, ss, prec); 191 #ifdef HAVE_IPV6 192 case AF_INET6: 193 return dns_create_aaaa_record(mem_ctx, name, 0, ss, prec); 194 #endif 195 default: 196 return ERROR_DNS_INVALID_PARAMETER; 197 } 157 198 } 158 199 … … 162 203 163 204 DNS_ERROR dns_create_name_not_in_use_record(TALLOC_CTX *mem_ctx, 164 const char *name, uint32 type,205 const char *name, uint32_t type, 165 206 struct dns_rrec **prec) 166 207 { … … 170 211 171 212 DNS_ERROR dns_create_delete_record(TALLOC_CTX *mem_ctx, const char *name, 172 uint16 type, uint16r_class,213 uint16_t type, uint16_t r_class, 173 214 struct dns_rrec **prec) 174 215 { … … 178 219 DNS_ERROR dns_create_tkey_record(TALLOC_CTX *mem_ctx, const char *keyname, 179 220 const char *algorithm_name, time_t inception, 180 time_t expiration, uint16 mode, uint16error,181 uint16 key_length, const uint8*key,221 time_t expiration, uint16_t mode, uint16_t error, 222 uint16_t key_length, const uint8_t *key, 182 223 struct dns_rrec **prec) 183 224 { … … 218 259 struct dns_tkey_record **ptkey) 219 260 { 220 struct dns_tkey_record *tkey = NULL;261 struct dns_tkey_record *tkey; 221 262 struct dns_buffer buf; 222 uint32 tmp_inception, tmp_expiration;263 uint32_t tmp_inception, tmp_expiration; 223 264 224 265 if (!(tkey = talloc(mem_ctx, struct dns_tkey_record))) { … … 241 282 242 283 if (tkey->key_length) { 243 if (!(tkey->key = TALLOC_ARRAY(tkey, uint8, tkey->key_length))) {284 if (!(tkey->key = talloc_array(tkey, uint8_t, tkey->key_length))) { 244 285 buf.error = ERROR_DNS_NO_MEMORY; 245 286 goto error; … … 265 306 DNS_ERROR dns_create_tsig_record(TALLOC_CTX *mem_ctx, const char *keyname, 266 307 const char *algorithm_name, 267 time_t time_signed, uint16 fudge,268 uint16 mac_length, const uint8*mac,269 uint16 original_id, uint16error,308 time_t time_signed, uint16_t fudge, 309 uint16_t mac_length, const uint8_t *mac, 310 uint16_t original_id, uint16_t error, 270 311 struct dns_rrec **prec) 271 312 { … … 305 346 306 347 DNS_ERROR dns_add_rrec(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, 307 uint16 *num_records, struct dns_rrec ***records)348 uint16_t *num_records, struct dns_rrec ***records) 308 349 { 309 350 struct dns_rrec **new_records; 310 351 311 if (!(new_records = TALLOC_REALLOC_ARRAY(mem_ctx, *records,352 if (!(new_records = talloc_realloc(mem_ctx, *records, 312 353 struct dns_rrec *, 313 354 (*num_records)+1))) { … … 335 376 struct dns_rrec *rec = NULL; 336 377 DNS_ERROR err; 337 uint16 i;378 uint16_t i; 338 379 339 380 err = dns_create_update(mem_ctx, zone, &req); 340 if (!ERR_DNS_IS_OK(err)) goto error;381 if (!ERR_DNS_IS_OK(err)) return err; 341 382 342 383 err = dns_create_name_not_in_use_record(req, host, QTYPE_CNAME, &rec); … … 405 446 406 447 for ( i=0; i<num_addrs; i++ ) { 407 err = dns_create_a_record(req, hostname, 3600, &ss_addrs[i], &rec); 448 449 switch(ss_addrs[i].ss_family) { 450 case AF_INET: 451 err = dns_create_a_record(req, hostname, 3600, &ss_addrs[i], &rec); 452 break; 453 #ifdef HAVE_IPV6 454 case AF_INET6: 455 err = dns_create_aaaa_record(req, hostname, 3600, &ss_addrs[i], &rec); 456 break; 457 #endif 458 default: 459 continue; 460 } 408 461 if (!ERR_DNS_IS_OK(err)) 409 462 goto error; -
vendor/current/lib/addns/dnssock.c
r740 r988 28 28 #include <unistd.h> 29 29 #include "system/select.h" 30 #include "../lib/util/debug.h" 30 31 31 32 static int destroy_dns_connection(struct dns_connection *conn) … … 41 42 struct dns_connection **result ) 42 43 { 43 uint32_t ulAddress;44 struct hostent *pHost;45 struct sockaddr_in s_in;44 struct addrinfo hints; 45 struct addrinfo *ai_result = NULL; 46 struct addrinfo *rp; 46 47 struct dns_connection *conn; 47 int res; 48 int ret; 49 char service[16]; 50 51 snprintf(service, sizeof(service), "%d", DNS_TCP_PORT); 48 52 49 53 if (!(conn = talloc(mem_ctx, struct dns_connection))) { … … 51 55 } 52 56 53 if ( (ulAddress = inet_addr( nameserver )) == INADDR_NONE ) { 54 if ( (pHost = gethostbyname( nameserver )) == NULL ) { 55 TALLOC_FREE(conn); 56 return ERROR_DNS_INVALID_NAME_SERVER; 57 } 58 memcpy( &ulAddress, pHost->h_addr, pHost->h_length ); 59 } 60 61 conn->s = socket( PF_INET, SOCK_STREAM, 0 ); 62 if (conn->s == -1) { 57 memset(&hints, 0, sizeof(struct addrinfo)); 58 hints.ai_family = AF_UNSPEC; 59 hints.ai_socktype = SOCK_STREAM; 60 hints.ai_flags = 0; 61 hints.ai_protocol = IPPROTO_TCP; 62 63 ret = getaddrinfo(nameserver, service, &hints, &ai_result); 64 if (ret != 0) { 65 DEBUG(1,("dns_tcp_open: getaddrinfo: %s\n", gai_strerror(ret))); 66 TALLOC_FREE(conn); 67 return ERROR_DNS_INVALID_NAME_SERVER; 68 } 69 70 for (rp = ai_result; rp != NULL; rp = rp->ai_next) { 71 conn->s = socket(rp->ai_family, 72 rp->ai_socktype, 73 rp->ai_protocol); 74 if (conn->s == -1) { 75 continue; 76 } 77 do { 78 ret = connect(conn->s, rp->ai_addr, rp->ai_addrlen); 79 } while ((ret == -1) && (errno == EINTR)); 80 if (ret != -1) { 81 /* Successful connect */ 82 break; 83 } 84 close(conn->s); 85 } 86 87 freeaddrinfo(ai_result); 88 89 /* Failed to connect with any address */ 90 if (rp == NULL) { 63 91 TALLOC_FREE(conn); 64 92 return ERROR_DNS_CONNECTION_FAILED; … … 67 95 talloc_set_destructor(conn, destroy_dns_connection); 68 96 69 s_in.sin_family = AF_INET;70 s_in.sin_addr.s_addr = ulAddress;71 s_in.sin_port = htons( DNS_TCP_PORT );72 73 res = connect(conn->s, (struct sockaddr*)&s_in, sizeof( s_in ));74 if (res == -1) {75 TALLOC_FREE(conn);76 return ERROR_DNS_CONNECTION_FAILED;77 }78 79 97 conn->hType = DNS_TCP; 80 81 98 *result = conn; 82 99 return ERROR_DNS_SUCCESS; … … 84 101 85 102 /******************************************************************** 86 ********************************************************************/103 * ********************************************************************/ 87 104 88 105 static DNS_ERROR dns_udp_open( const char *nameserver, … … 90 107 struct dns_connection **result ) 91 108 { 92 unsigned long ulAddress; 93 struct hostent *pHost; 94 struct sockaddr_in RecvAddr; 109 struct addrinfo hints; 110 struct addrinfo *ai_result = NULL; 111 struct addrinfo *rp; 112 struct sockaddr_storage RecvAddr; 95 113 struct dns_connection *conn; 114 int ret; 115 socklen_t RecvAddrLen; 116 char service[16]; 117 118 snprintf(service, sizeof(service), "%d", DNS_UDP_PORT); 96 119 97 120 if (!(conn = talloc(NULL, struct dns_connection))) { … … 99 122 } 100 123 101 if ( (ulAddress = inet_addr( nameserver )) == INADDR_NONE ) { 102 if ( (pHost = gethostbyname( nameserver )) == NULL ) { 103 TALLOC_FREE(conn); 104 return ERROR_DNS_INVALID_NAME_SERVER; 105 } 106 memcpy( &ulAddress, pHost->h_addr, pHost->h_length ); 107 } 108 109 /* Create a socket for sending data */ 110 111 conn->s = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); 112 if (conn->s == -1) { 124 memset(&hints, 0, sizeof(struct addrinfo)); 125 hints.ai_family = AF_UNSPEC; 126 hints.ai_socktype = SOCK_DGRAM; 127 hints.ai_flags = 0; 128 hints.ai_protocol = IPPROTO_UDP; 129 130 ret = getaddrinfo(nameserver, service, &hints, &ai_result); 131 if (ret != 0) { 132 DEBUG(1,("dns_ucp_open:getaddrinfo: %s\n", gai_strerror(ret))); 133 TALLOC_FREE(conn); 134 return ERROR_DNS_INVALID_NAME_SERVER; 135 } 136 137 for (rp = ai_result; rp != NULL; rp = rp->ai_next) { 138 conn->s = socket(rp->ai_family, 139 rp->ai_socktype, 140 rp->ai_protocol); 141 if (conn->s == -1) { 142 continue; 143 } 144 ret = connect(conn->s, rp->ai_addr, rp->ai_addrlen); 145 if (ret != -1) { 146 /* Successful connect */ 147 break; 148 } 149 close(conn->s); 150 } 151 152 freeaddrinfo(ai_result); 153 154 /* Failed to connect with any address */ 155 if (rp == NULL) { 113 156 TALLOC_FREE(conn); 114 157 return ERROR_DNS_CONNECTION_FAILED; … … 118 161 119 162 /* Set up the RecvAddr structure with the IP address of 120 the receiver (in this example case "123.456.789.1") 121 and the specified port number. */ 122 123 ZERO_STRUCT(RecvAddr); 124 RecvAddr.sin_family = AF_INET; 125 RecvAddr.sin_port = htons( DNS_UDP_PORT ); 126 RecvAddr.sin_addr.s_addr = ulAddress; 163 the receiver and the specified port number. */ 164 165 RecvAddrLen = sizeof(RecvAddr); 166 if (getpeername(conn->s, 167 (struct sockaddr *)&RecvAddr, 168 &RecvAddrLen) == -1) { 169 TALLOC_FREE(conn); 170 return ERROR_DNS_CONNECTION_FAILED; 171 } 127 172 128 173 conn->hType = DNS_UDP; 129 memcpy( &conn->RecvAddr, &RecvAddr, sizeof( struct sockaddr_in ));174 memcpy(&conn->RecvAddr, &RecvAddr, sizeof(struct sockaddr_storage)); 130 175 131 176 *result = conn; … … 136 181 ********************************************************************/ 137 182 138 DNS_ERROR dns_open_connection( const char *nameserver, int32 dwType,183 DNS_ERROR dns_open_connection( const char *nameserver, int32_t dwType, 139 184 TALLOC_CTX *mem_ctx, 140 185 struct dns_connection **conn ) … … 150 195 } 151 196 152 static DNS_ERROR write_all(int fd, uint8 *data, size_t len)197 static DNS_ERROR write_all(int fd, uint8_t *data, size_t len) 153 198 { 154 199 size_t total = 0; … … 156 201 while (total < len) { 157 202 158 ssize_t ret = write(fd, data + total, len - total); 203 ssize_t ret; 204 205 do { 206 ret = write(fd, data + total, len - total); 207 } while ((ret == -1) && (errno == EINTR)); 159 208 160 209 if (ret <= 0) { … … 174 223 const struct dns_buffer *buf) 175 224 { 176 uint16 len = htons(buf->offset);225 uint16_t len = htons(buf->offset); 177 226 DNS_ERROR err; 178 227 179 err = write_all(conn->s, (uint8 *)&len, sizeof(len));228 err = write_all(conn->s, (uint8_t *)&len, sizeof(len)); 180 229 if (!ERR_DNS_IS_OK(err)) return err; 181 230 … … 188 237 ssize_t ret; 189 238 190 ret = sendto(conn->s, buf->data, buf->offset, 0, 239 do { 240 ret = sendto(conn->s, buf->data, buf->offset, 0, 191 241 (struct sockaddr *)&conn->RecvAddr, 192 242 sizeof(conn->RecvAddr)); 243 } while ((ret == -1) && (errno == EINTR)); 193 244 194 245 if (ret != buf->offset) { … … 212 263 } 213 264 214 static DNS_ERROR read_all(int fd, uint8 *data, size_t len)265 static DNS_ERROR read_all(int fd, uint8_t *data, size_t len) 215 266 { 216 267 size_t total = 0; … … 226 277 227 278 fd_ready = poll(&pfd, 1, 10000); 279 if (fd_ready == -1) { 280 if (errno == EINTR) { 281 continue; 282 } 283 return ERROR_DNS_SOCKET_ERROR; 284 } 228 285 if ( fd_ready == 0 ) { 229 286 /* read timeout */ … … 231 288 } 232 289 233 ret = read(fd, data + total, len - total); 290 do { 291 ret = read(fd, data + total, len - total); 292 } while ((ret == -1) && (errno == EINTR)); 293 234 294 if (ret <= 0) { 235 295 /* EOF or error */ … … 249 309 struct dns_buffer *buf; 250 310 DNS_ERROR err; 251 uint16 len;252 253 if (!(buf = TALLOC_ZERO_P(mem_ctx, struct dns_buffer))) {254 return ERROR_DNS_NO_MEMORY; 255 } 256 257 err = read_all(conn->s, (uint8 *)&len, sizeof(len));311 uint16_t len; 312 313 if (!(buf = talloc_zero(mem_ctx, struct dns_buffer))) { 314 return ERROR_DNS_NO_MEMORY; 315 } 316 317 err = read_all(conn->s, (uint8_t *)&len, sizeof(len)); 258 318 if (!ERR_DNS_IS_OK(err)) { 259 319 return err; … … 262 322 buf->size = ntohs(len); 263 323 264 if (buf->size) { 265 if (!(buf->data = TALLOC_ARRAY(buf, uint8, buf->size))) { 266 TALLOC_FREE(buf); 267 return ERROR_DNS_NO_MEMORY; 268 } 269 } else { 270 buf->data = NULL; 271 } 272 273 err = read_all(conn->s, buf->data, buf->size); 324 if (buf->size == 0) { 325 *presult = buf; 326 return ERROR_DNS_SUCCESS; 327 } 328 329 if (!(buf->data = talloc_array(buf, uint8_t, buf->size))) { 330 TALLOC_FREE(buf); 331 return ERROR_DNS_NO_MEMORY; 332 } 333 334 err = read_all(conn->s, buf->data, talloc_get_size(buf->data)); 274 335 if (!ERR_DNS_IS_OK(err)) { 275 336 TALLOC_FREE(buf); … … 288 349 ssize_t received; 289 350 290 if (!(buf = TALLOC_ZERO_P(mem_ctx, struct dns_buffer))) {351 if (!(buf = talloc_zero(mem_ctx, struct dns_buffer))) { 291 352 return ERROR_DNS_NO_MEMORY; 292 353 } … … 296 357 */ 297 358 298 if (!(buf->data = TALLOC_ARRAY(buf, uint8, 512))) {359 if (!(buf->data = talloc_array(buf, uint8_t, 512))) { 299 360 TALLOC_FREE(buf); 300 361 return ERROR_DNS_NO_MEMORY; 301 362 } 302 363 303 received = recv(conn->s, (void *)buf->data, 512, 0); 364 do { 365 received = recv(conn->s, (void *)buf->data, 512, 0); 366 } while ((received == -1) && (errno == EINTR)); 304 367 305 368 if (received == -1) { … … 341 404 DNS_ERROR err; 342 405 343 err = dns_marshall_request( conn, req, &buf);406 err = dns_marshall_request(mem_ctx, req, &buf); 344 407 if (!ERR_DNS_IS_OK(err)) goto error; 345 408 -
vendor/current/lib/addns/dnsutils.c
r740 r988 23 23 */ 24 24 25 #include "includes.h" 26 #include "librpc/ndr/libndr.h" 27 #include "librpc/gen_ndr/ndr_misc.h" 28 25 29 #include "dns.h" 26 30 #include <ctype.h> 31 27 32 28 33 static DNS_ERROR LabelList( TALLOC_CTX *mem_ctx, … … 54 59 } 55 60 56 if (!(result = TALLOC_ZERO_P(mem_ctx, struct dns_domain_label))) {61 if (!(result = talloc_zero(mem_ctx, struct dns_domain_label))) { 57 62 return ERROR_DNS_NO_MEMORY; 58 63 } … … 134 139 #if defined(WITH_DNS_UPDATES) 135 140 136 uuid_t uuid;141 struct GUID guid; 137 142 138 /* 139 * uuid_unparse gives 36 bytes plus '\0' 140 */ 141 if (!(result = TALLOC_ARRAY(mem_ctx, char, 37))) { 142 return NULL; 143 } 144 145 uuid_generate( uuid ); 146 uuid_unparse( uuid, result ); 143 guid = GUID_random(); 144 result = GUID_string(mem_ctx, &guid); 147 145 148 146 #endif -
vendor/current/lib/addns/wscript_build
r740 r988 2 2 3 3 bld.SAMBA_LIBRARY('addns', 4 source='dns record.c dnsutils.c dnssock.c dnsgss.c dnsmarshall.c error.c',5 public_deps=' talloc krb5 k5crypto com_err gssapi gssapi_krb5 uuid',4 source='dnsquery.c dnsrecord.c dnsutils.c dnssock.c dnsgss.c dnsmarshall.c error.c', 5 public_deps='samba-util gssapi ndr resolv', 6 6 private_library=True, 7 7 vars=locals())
Note:
See TracChangeset
for help on using the changeset viewer.