Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
large files on 32bit centos
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed May 30, 2010
1 parent b9d060b commit ac8adbc
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion net/vnetwork.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ permission notice:
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <sys/types.h>
#include <pthread.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdarg.h>
#include <ifaddrs.h>
Expand Down
1 change: 1 addition & 0 deletions node/handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ permission notice:
#include <fcntl.h>
#include <assert.h>
#include <errno.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <pthread.h>
#include <sys/vfs.h> /* statfs */
Expand Down
1 change: 1 addition & 0 deletions node/handlers_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ permission notice:
#include <fcntl.h>
#include <assert.h>
#include <errno.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <pthread.h>
#include <sys/vfs.h> /* statfs */
Expand Down
18 changes: 10 additions & 8 deletions storage/storage-windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define __USE_GNU /* strnlen */
#include <string.h>
#include <sys/types.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <unistd.h>
#include <sys/types.h>
Expand Down Expand Up @@ -65,7 +66,7 @@ int decryptWindowsPassword(char *encpass, int encsize, char *pkfile, char **out)

int encryptWindowsPassword(char *pass, char *key, char **out, int *outsize) {
char *sshkey_dec, *modbuf, *exponentbuf;
char *ptr, *tmp, hexstr[2], *enc64;
char *ptr, *tmp, hexstr[4], *enc64;
char *dec64, encpassword[512];

uint32_t len, exponent;
Expand All @@ -81,7 +82,7 @@ int encryptWindowsPassword(char *pass, char *key, char **out, int *outsize) {
if (!sshkey_dec) {
return(1);
}

ptr = sshkey_dec;
memcpy(&len, ptr, 4);
len = htonl(len);
Expand Down Expand Up @@ -121,15 +122,16 @@ int encryptWindowsPassword(char *pass, char *key, char **out, int *outsize) {
tmp = strndup(ptr, 1);
if (tmp) {
len = *tmp;
sprintf(hexstr, "%02X", (len<<24)>>24);
bzero(hexstr, sizeof(char) * 4);
snprintf(hexstr, 3, "%02X", (len<<24)>>24);
strcat(modbuf, hexstr);
ptr++;
ptr+=1;
free(tmp);
}
}
// printf("MOD: |%s|\n", modbuf);
// printf("EXPONENT: |%s|\n", exponentbuf);
//printf("MOD: |%s|\n", modbuf);
//printf("EXPONENT: |%s|\n", exponentbuf);

r = RSA_new();
if (!r) {
if (sshkey_dec) free(sshkey_dec);
Expand Down Expand Up @@ -184,7 +186,7 @@ int makeWindowsFloppy(char *euca_home, char *rundir_path, char *keyName) {

bzero(password, sizeof(char)*16);
for (i=0; i<8; i++) {
char c[2];
char c[4];
snprintf(c, 2, "%c", RANDALPHANUM);
strcat(password, c);
}
Expand Down
1 change: 1 addition & 0 deletions storage/storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ permission notice:
#define __USE_GNU /* strnlen */
#include <string.h>
#include <sys/types.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <unistd.h>
#include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions util/euca_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ permission notice:
*/

#include <sys/types.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <unistd.h>
#include <assert.h>
Expand Down
1 change: 1 addition & 0 deletions util/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ permission notice:
#include <stdlib.h>
#include <sys/types.h>
#include <semaphore.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <sys/ipc.h>
#include <sys/sem.h>
Expand Down
1 change: 1 addition & 0 deletions util/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ permission notice:
#include "misc.h"
#include <stdarg.h>
#include <sys/types.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <unistd.h>
#include <time.h>
Expand Down
1 change: 1 addition & 0 deletions util/windows-bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <fcntl.h>
#include <assert.h>
#include <errno.h>
#define _FILE_OFFSET_BITS 64
#include <sys/stat.h>
#include <pthread.h>
#include <sys/vfs.h> /* statfs */
Expand Down

0 comments on commit ac8adbc

Please sign in to comment.