summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2008-07-16 20:54:25 -0700
committerAaron Plattner <aplattner@nvidia.com>2008-07-16 20:54:25 -0700
commit031437a19cb87b71b4c8a274c1a3ac759278b252 (patch)
treefcea80ad641bf15550a1cc9c8a9cd6612d307198
parentf0c14e5a22db1d31ea26aa6b034cf8d06d528d2c (diff)
96.43.0796.43.07
-rw-r--r--DRIVER_VERSION2
-rw-r--r--backup.c22
-rw-r--r--install-from-cwd.c2
-rw-r--r--kernel.c4
-rw-r--r--log.c5
-rw-r--r--nvidia-installer.c7
-rw-r--r--nvidia-installer.h2
-rw-r--r--option_table.h14
8 files changed, 46 insertions, 12 deletions
diff --git a/DRIVER_VERSION b/DRIVER_VERSION
index 6927adb..8835927 100644
--- a/DRIVER_VERSION
+++ b/DRIVER_VERSION
@@ -1 +1 @@
-96.43.05
+96.43.07
diff --git a/backup.c b/backup.c
index 95d6839..b713633 100644
--- a/backup.c
+++ b/backup.c
@@ -141,6 +141,7 @@ static char *create_backwards_compatible_version_string(const char *str);
int init_backup(Options *op, Package *p)
{
+ mode_t orig_mode;
char *version;
FILE *log;
@@ -158,9 +159,22 @@ int init_backup(Options *op, Package *p)
return FALSE;
}
+ /*
+ * fopen below creates the file with mode 0666 & ~umask.
+ * In order to ensure the result of that calculation is BACKUP_LOG_PERMS,
+ * we temporarily set umask to ~BACKUP_LOG_PERMS to leave just the bits
+ * we want.
+ *
+ * This assumes that BACKUP_LOG does not already exist (if it does, the
+ * file permissions will not be modified.) This is assured by the
+ * directory removal and re-creation code above.
+ */
+ orig_mode = umask(~BACKUP_LOG_PERMS);
+
/* create the log file */
log = fopen(BACKUP_LOG, "a");
+ umask(orig_mode);
if (!log) {
ui_error(op, "Unable to create backup log file '%s' (%s).",
BACKUP_LOG, strerror(errno));
@@ -184,14 +198,6 @@ int init_backup(Options *op, Package *p)
return FALSE;
}
- /* set the log file permissions */
-
- if (chmod(BACKUP_LOG, BACKUP_LOG_PERMS) == -1) {
- ui_error(op, "Unable to set file permissions %04o for %s (%s).",
- BACKUP_LOG_PERMS, BACKUP_LOG, strerror(errno));
- return FALSE;
- }
-
return TRUE;
} /* init_backup() */
diff --git a/install-from-cwd.c b/install-from-cwd.c
index edb8888..ad255c4 100644
--- a/install-from-cwd.c
+++ b/install-from-cwd.c
@@ -117,6 +117,8 @@ int install_from_cwd(Options *op)
if (!get_license_acceptance(op)) return FALSE;
+ ui_log(op, "Installing NVIDIA driver version %s.", p->version);
+
/*
* determine the current NVIDIA version (if any); ask the user if
* they really want to overwrite the existing installation
diff --git a/kernel.c b/kernel.c
index a9c631f..14170df 100644
--- a/kernel.c
+++ b/kernel.c
@@ -1451,9 +1451,11 @@ int check_cc_version(Options *op, Package *p)
* If we're building/installing for a different kernel, then we
* can't do the gcc version check (we don't have a /proc/version
* string from which to get the kernel's gcc version).
+ * If the user passes the option no-cc-version-check, then we also
+ * shouldn't perform the cc version check.
*/
- if (op->kernel_name) {
+ if (op->ignore_cc_version_check) {
setenv("IGNORE_CC_MISMATCH", "1", 1);
return TRUE;
}
diff --git a/log.c b/log.c
index c268c46..62641b8 100644
--- a/log.c
+++ b/log.c
@@ -97,7 +97,8 @@ void log_init(Options *op)
now = time(NULL);
log_printf(op, TRUE, NULL, "creation time: %s", ctime(&now));
-
+ log_printf(op, TRUE, NULL, "installer version: %s",
+ NVIDIA_INSTALLER_VERSION);
log_printf(op, TRUE, NULL, "");
log_printf(op, TRUE, NULL, "option status:");
@@ -149,6 +150,8 @@ void log_init(Options *op)
SELINUXSTR(op->selinux_option));
log_printf(op, TRUE, NULL, " no X server check : %s",
BOOLSTR(op->no_x_check));
+ log_printf(op, TRUE, NULL, " no cc version check : %s",
+ BOOLSTR(op->ignore_cc_version_check));
log_printf(op, TRUE, NULL, " force tls : %s",
TLSSTR(op->which_tls));
#if defined(NV_X86_64)
diff --git a/nvidia-installer.c b/nvidia-installer.c
index ee6e65b..394be97 100644
--- a/nvidia-installer.c
+++ b/nvidia-installer.c
@@ -290,6 +290,7 @@ Options *parse_commandline(int argc, char *argv[])
case 'k':
op->kernel_name = optarg;
op->no_precompiled_interface = TRUE;
+ op->ignore_cc_version_check = TRUE;
break;
case XFREE86_PREFIX_OPTION:
@@ -426,6 +427,9 @@ Options *parse_commandline(int argc, char *argv[])
case NO_X_CHECK_OPTION:
op->no_x_check = TRUE;
break;
+ case NO_CC_VERSION_CHECK_OPTION:
+ op->ignore_cc_version_check = TRUE;
+ break;
default:
fmterr("");
@@ -491,6 +495,9 @@ int main(int argc, char *argv[])
{
Options *op;
int ret = FALSE;
+
+ /* Ensure created files get the permissions we expect */
+ umask(022);
/* parse the commandline options */
diff --git a/nvidia-installer.h b/nvidia-installer.h
index 5315635..09e1418 100644
--- a/nvidia-installer.h
+++ b/nvidia-installer.h
@@ -188,6 +188,8 @@ typedef struct __options {
void *ui_priv; /* for use by the ui's */
+ int ignore_cc_version_check;
+
} Options;
diff --git a/option_table.h b/option_table.h
index 2398fee..8a0d2bb 100644
--- a/option_table.h
+++ b/option_table.h
@@ -51,7 +51,8 @@ enum {
DOCUMENTATION_PREFIX_OPTION,
X_LIBRARY_PATH_OPTION,
NO_KERNEL_MODULE_OPTION,
- NO_X_CHECK_OPTION
+ NO_X_CHECK_OPTION,
+ NO_CC_VERSION_CHECK_OPTION
};
static const NVOption __options[] = {
@@ -417,6 +418,17 @@ static const NVOption __options[] = {
"restores the SIGWINCH signal handler after the child process "
"has terminated. This option disables this behavior." },
+ { "no-cc-version-check", NO_CC_VERSION_CHECK_OPTION, 0,
+ "The NVIDIA kernel module should be compiled with the same compiler that "
+ "was used to compile the currently running kernel. The layout of some "
+ "Linux kernel data structures may be dependent on the version of gcc "
+ "used to compile it. The Linux 2.6 kernel modules are tagged with "
+ "information about the compiler and the Linux kernel's module loader "
+ "performs a strict version match check. nvidia-installer checks for "
+ "mismatches prior to building the NVIDIA kernel module and aborts the "
+ "installation in case of failures. Use this option to override this "
+ "check." },
+
/* Orphaned options: These options were in the long_options table in
* nvidia-installer.c but not in the help. */
{ "debug", 'd', 0, NULL },