Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
This commit is contained in:
		
						commit
						88ede2cec7
					
				| 
						 | 
					@ -3280,8 +3280,8 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
 | 
				
			||||||
        xFixed *params = pict->filter_params;
 | 
					        xFixed *params = pict->filter_params;
 | 
				
			||||||
        INT32 cwidth = xFixedToInt(params[0]);
 | 
					        INT32 cwidth = xFixedToInt(params[0]);
 | 
				
			||||||
        INT32 cheight = xFixedToInt(params[1]);
 | 
					        INT32 cheight = xFixedToInt(params[1]);
 | 
				
			||||||
        int xoff = params[0] >> 1;
 | 
					        int xoff = (params[0] - xFixed1) >> 1;
 | 
				
			||||||
        int yoff = params[1] >> 1;
 | 
						int yoff = (params[1] - xFixed1) >> 1;
 | 
				
			||||||
        params += 2;
 | 
					        params += 2;
 | 
				
			||||||
        for (i = 0; i < width; ++i) {
 | 
					        for (i = 0; i < width; ++i) {
 | 
				
			||||||
            if (!v.vector[2]) {
 | 
					            if (!v.vector[2]) {
 | 
				
			||||||
| 
						 | 
					@ -3325,6 +3325,11 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							satot >>= 16;
 | 
				
			||||||
 | 
							srtot >>= 16;
 | 
				
			||||||
 | 
							sgtot >>= 16;
 | 
				
			||||||
 | 
							sbtot >>= 16;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (satot < 0) satot = 0; else if (satot > 0xff) satot = 0xff;
 | 
					                if (satot < 0) satot = 0; else if (satot > 0xff) satot = 0xff;
 | 
				
			||||||
                if (srtot < 0) srtot = 0; else if (srtot > 0xff) srtot = 0xff;
 | 
					                if (srtot < 0) srtot = 0; else if (srtot > 0xff) srtot = 0xff;
 | 
				
			||||||
                if (sgtot < 0) sgtot = 0; else if (sgtot > 0xff) sgtot = 0xff;
 | 
					                if (sgtot < 0) sgtot = 0; else if (sgtot > 0xff) sgtot = 0xff;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1896,7 +1896,11 @@ xf86RunVtInit(void)
 | 
				
			||||||
          FatalError("xf86RunVtInit: fork failed (%s)\n", strerror(errno));
 | 
					          FatalError("xf86RunVtInit: fork failed (%s)\n", strerror(errno));
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
      case 0:  /* child */
 | 
					      case 0:  /* child */
 | 
				
			||||||
          setuid(getuid());
 | 
						  if (setuid(getuid()) == -1) {
 | 
				
			||||||
 | 
						      xf86Msg(X_ERROR, "xf86RunVtInit: setuid failed (%s)\n",
 | 
				
			||||||
 | 
								 strerror(errno));
 | 
				
			||||||
 | 
						      exit(255);
 | 
				
			||||||
 | 
						  }
 | 
				
			||||||
          /* set stdin, stdout to the consoleFd */
 | 
					          /* set stdin, stdout to the consoleFd */
 | 
				
			||||||
          for (i = 0; i < 2; i++) {
 | 
					          for (i = 0; i < 2; i++) {
 | 
				
			||||||
            if (xf86Info.consoleFd != i) {
 | 
					            if (xf86Info.consoleFd != i) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1270,7 +1270,10 @@ xf86execl(const char *pathname, const char *arg, ...)
 | 
				
			||||||
#ifndef SELF_CONTAINED_WRAPPER
 | 
					#ifndef SELF_CONTAINED_WRAPPER
 | 
				
			||||||
	xf86DisableIO();
 | 
						xf86DisableIO();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
        setuid(getuid());
 | 
					        if (setuid(getuid()) == -1) {
 | 
				
			||||||
 | 
							ErrorF("xf86Execl: setuid() failed: %s\n", strerror(errno));
 | 
				
			||||||
 | 
							exit(255);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
#if !defined(SELF_CONTAINED_WRAPPER)
 | 
					#if !defined(SELF_CONTAINED_WRAPPER)
 | 
				
			||||||
        /* set stdin, stdout to the consoleFD, and leave stderr alone */
 | 
					        /* set stdin, stdout to the consoleFD, and leave stderr alone */
 | 
				
			||||||
        for (i = 0; i < 2; i++)
 | 
					        for (i = 0; i < 2; i++)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -170,7 +170,10 @@ xf86writeConfigFile (const char *filename, XF86ConfigPtr cptr)
 | 
				
			||||||
					strerror(errno));
 | 
										strerror(errno));
 | 
				
			||||||
			return 0;
 | 
								return 0;
 | 
				
			||||||
		case 0: /* child */
 | 
							case 0: /* child */
 | 
				
			||||||
			setuid(getuid());
 | 
								if (setuid(getuid() == -1) 
 | 
				
			||||||
 | 
								    FatalError("xf86writeConfigFile(): "
 | 
				
			||||||
 | 
									"setuid failed(%s)\n", 
 | 
				
			||||||
 | 
									strerror(errno));
 | 
				
			||||||
			ret = doWriteConfigFile(filename, cptr);
 | 
								ret = doWriteConfigFile(filename, cptr);
 | 
				
			||||||
			exit(ret);
 | 
								exit(ret);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										20
									
								
								os/utils.c
								
								
								
								
							
							
						
						
									
										20
									
								
								os/utils.c
								
								
								
								
							| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
/* $XdotOrg: xserver/xorg/os/utils.c,v 1.25 2006/03/25 19:52:05 ajax Exp $ */
 | 
					/* $XdotOrg: xserver/xorg/os/utils.c,v 1.26 2006-06-01 22:06:41 daniels Exp $ */
 | 
				
			||||||
/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
 | 
					/* $Xorg: utils.c,v 1.5 2001/02/09 02:05:24 xorgcvs Exp $ */
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1713,8 +1713,10 @@ System(char *command)
 | 
				
			||||||
    case -1:	/* error */
 | 
					    case -1:	/* error */
 | 
				
			||||||
	p = -1;
 | 
						p = -1;
 | 
				
			||||||
    case 0:	/* child */
 | 
					    case 0:	/* child */
 | 
				
			||||||
	setgid(getgid());
 | 
						if (setgid(getgid()) == -1)
 | 
				
			||||||
	setuid(getuid());
 | 
						    _exit(127);
 | 
				
			||||||
 | 
						if (setuid(getuid()) == -1)
 | 
				
			||||||
 | 
						    _exit(127);
 | 
				
			||||||
	execl("/bin/sh", "sh", "-c", command, (char *)NULL);
 | 
						execl("/bin/sh", "sh", "-c", command, (char *)NULL);
 | 
				
			||||||
	_exit(127);
 | 
						_exit(127);
 | 
				
			||||||
    default:	/* parent */
 | 
					    default:	/* parent */
 | 
				
			||||||
| 
						 | 
					@ -1765,8 +1767,10 @@ Popen(char *command, char *type)
 | 
				
			||||||
	xfree(cur);
 | 
						xfree(cur);
 | 
				
			||||||
	return NULL;
 | 
						return NULL;
 | 
				
			||||||
    case 0:	/* child */
 | 
					    case 0:	/* child */
 | 
				
			||||||
	setgid(getgid());
 | 
						if (setgid(getgid()) == -1)
 | 
				
			||||||
	setuid(getuid());
 | 
						    _exit(127);
 | 
				
			||||||
 | 
						if (setuid(getuid()) == -1)
 | 
				
			||||||
 | 
						    _exit(127);
 | 
				
			||||||
	if (*type == 'r') {
 | 
						if (*type == 'r') {
 | 
				
			||||||
	    if (pdes[1] != 1) {
 | 
						    if (pdes[1] != 1) {
 | 
				
			||||||
		/* stdout */
 | 
							/* stdout */
 | 
				
			||||||
| 
						 | 
					@ -1840,8 +1844,10 @@ Fopen(char *file, char *type)
 | 
				
			||||||
	xfree(cur);
 | 
						xfree(cur);
 | 
				
			||||||
	return NULL;
 | 
						return NULL;
 | 
				
			||||||
    case 0:	/* child */
 | 
					    case 0:	/* child */
 | 
				
			||||||
	setgid(getgid());
 | 
						if (setgid(getgid()) == -1)
 | 
				
			||||||
	setuid(getuid());
 | 
						    _exit(127);
 | 
				
			||||||
 | 
						if (setuid(getuid()) == -1)
 | 
				
			||||||
 | 
						    _exit(127);
 | 
				
			||||||
	if (*type == 'r') {
 | 
						if (*type == 'r') {
 | 
				
			||||||
	    if (pdes[1] != 1) {
 | 
						    if (pdes[1] != 1) {
 | 
				
			||||||
		/* stdout */
 | 
							/* stdout */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue