Ignore:
Timestamp:
May 13, 2014, 11:39:04 AM (12 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update trunk to 3.6.23

Location:
trunk/server
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/web/cgi.c

    r745 r862  
    4949static char *C_user;
    5050static char *C_pass;
     51
    5152static bool inetd_server;
    5253static bool got_request;
     
    331332
    332333        if (!setuid(0)) {
    333                 C_pass = secrets_fetch_generic("root", "SWAT");
    334                 if (C_pass == NULL) {
    335                         char *tmp_pass = NULL;
    336                         tmp_pass = generate_random_password(talloc_tos(),
    337                                                             16, 16);
    338                         if (tmp_pass == NULL) {
    339                                 printf("%sFailed to create random nonce for "
    340                                        "SWAT session\n<br>%s\n", head, tail);
    341                                 exit(0);
    342                         }
    343                         secrets_store_generic("root", "SWAT", tmp_pass);
    344                         C_pass = SMB_STRDUP(tmp_pass);
    345                         TALLOC_FREE(tmp_pass);
    346                 }
     334                C_pass = SMB_STRDUP(cgi_nonce());
    347335        }
    348336        setuid(pwd->pw_uid);
     
    459447{
    460448        return(C_pass);
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
     468
     469
     470
     471
     472
    461473}
    462474
  • trunk/server/source3/web/swat.c

    r751 r862  
    155155        uint8_t token[16];
    156156        int i;
     157
    157158
    158159        token_str[0] = '\0';
     
    168169                MD5Update(&md5_ctx, (uint8_t *)pass, strlen(pass));
    169170        }
     171
    170172
    171173        MD5Final(token, &md5_ctx);
     
    267269                printf("Expires: 0\r\n");
    268270        }
    269         printf("Content-type: text/html\r\n\r\n");
     271        printf("Content-type: text/html\r\n");
     272        printf("X-Frame-Options: DENY\r\n\r\n");
    270273
    271274        if (!include_html("include/header.html")) {
  • trunk/server/source3/web/swat_proto.h

    r617 r862  
    3333char *cgi_user_name(void);
    3434char *cgi_user_pass(void);
     35
    3536void cgi_setup(const char *rootdir, int auth_required);
    3637const char *cgi_baseurl(void);
Note: See TracChangeset for help on using the changeset viewer.