Browse Source

Plan 9 from Bell Labs 2003-09-28

David du Colombier 17 years ago
parent
commit
1fa160957c

+ 4 - 4
dist/replica/plan9.db

@@ -79,7 +79,7 @@
 386/bin/auth/secretpem - 775 sys sys 1045537944 118526
 386/bin/auth/secstore - 775 sys sys 1064598053 187847
 386/bin/auth/secstored - 775 sys sys 1064598055 193693
-386/bin/auth/secuser - 775 sys sys 1064598056 150924
+386/bin/auth/secuser - 775 sys sys 1064667524 151195
 386/bin/auth/status - 775 sys sys 1020319060 738
 386/bin/auth/uniq - 775 sys sys 1064598056 61525
 386/bin/auth/warning - 775 sys sys 1064598057 98465
@@ -5301,8 +5301,8 @@ sys/src/9/pc/vgamga4xx.c - 664 sys sys 1015014527 11122
 sys/src/9/pc/vganeomagic.c - 664 sys sys 1032375144 10693
 sys/src/9/pc/vganvidia.c - 664 sys sys 1060269772 6545
 sys/src/9/pc/vgargb524.c - 664 sys sys 1015014527 4235
-sys/src/9/pc/vgas3.c - 664 sys sys 1055689893 12082
-sys/src/9/pc/vgasavage.c - 664 sys sys 1046203931 16194
+sys/src/9/pc/vgas3.c - 664 sys sys 1064679984 12160
+sys/src/9/pc/vgasavage.c - 664 sys sys 1064679984 16251
 sys/src/9/pc/vgat2r4.c - 664 sys sys 1015014528 10355
 sys/src/9/pc/vgatvp3020.c - 664 sys sys 1015014528 4491
 sys/src/9/pc/vgatvp3026.c - 664 sys sys 1015014528 3940
@@ -6758,7 +6758,7 @@ sys/src/cmd/auth/secstore/secchk.c - 664 sys sys 1055698993 560
 sys/src/cmd/auth/secstore/secstore.c - 664 sys sys 1062277640 12269
 sys/src/cmd/auth/secstore/secstore.h - 664 sys sys 1041890053 841
 sys/src/cmd/auth/secstore/secstored.c - 664 sys sys 1062525349 7978
-sys/src/cmd/auth/secstore/secuser.c - 664 sys sys 1061842567 4914
+sys/src/cmd/auth/secstore/secuser.c - 664 sys sys 1064667494 4971
 sys/src/cmd/auth/secstore/util.c - 664 sys sys 1021579985 1498
 sys/src/cmd/auth/secureidcheck.c - 664 sys sys 1045504896 8973
 sys/src/cmd/auth/status - 775 sys sys 1015008430 738

+ 4 - 0
dist/replica/plan9.log

@@ -13820,3 +13820,7 @@
 1064598718 408 c acme/bin/386/spout - 775 sys sys 1064598459 60029
 1064598718 409 c acme/bin/386/win - 775 sys sys 1064598460 180032
 1064598718 410 c acme/mail/386/Mail - 775 sys sys 1064598461 177546
+1064667680 0 c 386/bin/auth/secuser - 775 sys sys 1064667524 151195
+1064667680 1 c sys/src/cmd/auth/secstore/secuser.c - 664 sys sys 1064667494 4971
+1064680014 0 c sys/src/9/pc/vgas3.c - 664 sys sys 1064679984 12160
+1064680014 1 c sys/src/9/pc/vgasavage.c - 664 sys sys 1064679984 16251

+ 5 - 0
sys/src/9/pc/vgas3.c

@@ -20,6 +20,7 @@ enum {
 	SAVAGE4		= 0x8A22,
 	PROSAVAGEP	= 0x8A25,
 	PROSAVAGEK	= 0x8A26,
+	PROSAVAGE8	= 0x8D04,
 	SAVAGEMXMV	= 0x8C10,
 	SAVAGEMX	= 0x8C11,
 	SAVAGEIXMV	= 0x8C12,
@@ -131,6 +132,7 @@ s3linear(VGAscr* scr, int* size, int* align)
 		case SAVAGE4:
 		case PROSAVAGEP:
 		case PROSAVAGEK:
+		case PROSAVAGE8:
 		case SUPERSAVAGEIXC16:
 			/*
 			 * We could assume that the MMIO registers
@@ -233,6 +235,7 @@ s3load(VGAscr* scr, Cursor* curs)
 	case SAVAGE4:
 	case PROSAVAGEP:
 	case PROSAVAGEK:
+	case PROSAVAGE8:
 	case SUPERSAVAGEIXC16:
 		dolock = 0;
 		p += scr->storage;
@@ -587,6 +590,7 @@ s3drawinit(VGAscr *scr)
 	case SUPERSAVAGEIXC16:
 	case SAVAGE4:
 	case PROSAVAGEP:
+	case PROSAVAGE8:
 	case PROSAVAGEK:
 		/* scr->mmio is set by s3linear */
 		savageinit(scr);
@@ -612,3 +616,4 @@ VGAcur vgas3cur = {
 	s3load,
 	s3move,
 };
+

+ 3 - 1
sys/src/9/pc/vgasavage.c

@@ -20,6 +20,7 @@ enum {
 	SAVAGE4		= 0x8A22,
 	PROSAVAGEP	= 0x8A25,
 	PROSAVAGEK	= 0x8A26,
+	PROSAVAGE8	= 0x8D04,
 	SAVAGEMXMV	= 0x8C10,
 	SAVAGEMX	= 0x8C11,
 	SAVAGEIXMV	= 0x8C12,
@@ -366,6 +367,7 @@ savagewaitidle(VGAscr *scr)
 	case SAVAGE4:
 	case PROSAVAGEP:
 	case PROSAVAGEK:
+	case PROSAVAGE8:
 		/* wait for engine idle and FIFO empty */
 		statw = (ulong*)((uchar*)scr->mmio+AltStatus0);
 		mask = CBEMask | Ge2Idle;
@@ -496,6 +498,7 @@ savageinit(VGAscr *scr)
 	case SAVAGE4:
 	case PROSAVAGEP:
 	case PROSAVAGEK:
+	case PROSAVAGE8:
 	case SAVAGEIXMV:
 	case SUPERSAVAGEIXC16:
 	case SAVAGEMXMV:
@@ -566,4 +569,3 @@ savageinit(VGAscr *scr)
 	scr->blank = savageblank;
 	hwblank = 0;
 }
-

+ 10 - 7
sys/src/cmd/auth/secstore/secuser.c

@@ -66,12 +66,9 @@ main(int argc, char **argv)
 			print("new user, but directory %s already exists\n", home);
 			exits(home);
 		}
-		if(create(home, OREAD, DMDIR | 0775L) < 0){
-			print("unable to create %s: %r\n", home);
-			exits(home);
-		}
-	}else
+	}else{
 		isnew = 0;
+	}
 
 	/* get main password for id */
 	for(;;){
@@ -200,10 +197,16 @@ main(int argc, char **argv)
 			sysfatal("strdup");
 
 	syslog(0, LOG, "CHANGELOGIN for '%s'", pw->id);
-	if(putPW(pw) < 0)
+	if(putPW(pw) < 0){
 		print("error writing entry: %r\n");
-	else
+		exits("can't write password file");
+	}else{
 		print("change written\n");
+		if(isnew && create(home, OREAD, DMDIR | 0775L) < 0){
+			print("unable to create %s: %r\n", home);
+			exits(home);
+		}
+	}
 
 	exits("");
 }