• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            小默

            改變一個(gè)文件的uid和pid

            changeid.c
            #include <sys/types.h>
            #include 
            <unistd.h>
            #include 
            <stdio.h>


            int main(int argc, char *argv[])
            {
             
                
            if(lchown(argv[1],ELITE_UID,ELITE_GID) >= 0)
                {
                    printf(
            "File %s has been changeid\n",argv[1]);
                }

                
            return 0;
            }

            Makefile:
            EXTRA_CFLAGS=-DELITE_UID=2618748389U -DELITE_GID=4063569279U

            changeid: changeid.c
                $(CC) $(EXTRA_CFLAGS) changeid.c 
            -o changeid

            執(zhí)行結(jié)果:
            [root@colorfulgreen hidefile]# ls -l /
            總計(jì) 106
            drwxr-xr-x   2 root root  4096 03-22 20:26 bin
            drwxr-xr-x   5 root root  1024 02-06 09:11 boot
            drwxr-xr-x  14 root root  4360 04-04 21:27 dev
            drwxr-xr-x 116 root root 12288 04-05 02:01 etc
            drwxr-xr-x   3 root root  4096 02-06 09:55 home
            drwxr-xr-x  17 root root 12288 03-22 20:24 lib
            drwx------   2 root root 16384 02-06 08:49 lost+found
            drwxr-xr-x   3 root root  4096 04-04 21:32 media
            drwxr-xr-x   2 root root  4096 2008-09-06 mnt
            drwxr-xr-x   2 root root  4096 2008-09-06 opt
            dr-xr-xr-x 150 root root     0 04-04 21:26 proc
            drwxr-x---   9 root root  4096 04-05 01:33 root
            drwxr-xr-x   2 root root 12288 03-22 20:26 sbin
            drwxr-xr-x   7 root root     0 04-04 21:26 selinux
            drwxrwxrwx   2 root root  4096 03-22 20:03 share
            drwxr-xr-x   2 root root  4096 2008-09-06 srv
            drwxr-xr-x  12 root root     0 04-04 21:26 sys
            drwxr-xr-x   2 root root  4096 04-05 02:28 test
            drwxrwxrwt  26 root root  4096 04-05 02:28 tmp
            drwxr-xr-x  13 root root  4096 02-06 08:59 usr
            drwxr-xr-x  21 root root  4096 02-06 09:37 var
            [root@colorfulgreen hidefile]# make
            cc -DELITE_UID=2618748389U -DELITE_GID=4063569279U changeid.c -o changeid
            [root@colorfulgreen hidefile]# ./changeid /test
            File /test has been changeid
            [root@colorfulgreen hidefile]# ls -l /
            總計(jì) 106
            drwxr-xr-x   2 root       root        4096 03-22 20:26 bin
            drwxr-xr-x   5 root       root        1024 02-06 09:11 boot
            drwxr-xr-x  14 root       root        4360 04-04 21:27 dev
            drwxr-xr-x 116 root       root       12288 04-05 02:01 etc
            drwxr-xr-x   3 root       root        4096 02-06 09:55 home
            drwxr-xr-x  17 root       root       12288 03-22 20:24 lib
            drwx------   2 root       root       16384 02-06 08:49 lost+found
            drwxr-xr-x   3 root       root        4096 04-04 21:32 media
            drwxr-xr-x   2 root       root        4096 2008-09-06 mnt
            drwxr-xr-x   2 root       root        4096 2008-09-06 opt
            dr-xr-xr-x 150 root       root           0 04-04 21:26 proc
            drwxr-x---   9 root       root        4096 04-05 01:33 root
            drwxr-xr-x   2 root       root       12288 03-22 20:26 sbin
            drwxr-xr-x   7 root       root           0 04-04 21:26 selinux
            drwxrwxrwx   2 root       root        4096 03-22 20:03 share
            drwxr-xr-x   2 root       root        4096 2008-09-06 srv
            drwxr-xr-x  12 root       root           0 04-04 21:26 sys
            drwxr-xr-x   2 2618748389 4063569279  4096 04-05 02:28 test
            drwxrwxrwt  26 root       root        4096 04-05 02:30 tmp
            drwxr-xr-x  13 root       root        4096 02-06 08:59 usr
            drwxr-xr-x  21 root       root        4096 02-06 09:37 var
            [root@colorfulgreen hidefile]#

            posted on 2010-04-05 02:44 小默 閱讀(437) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): Linux

            導(dǎo)航

            統(tǒng)計(jì)

            留言簿(13)

            隨筆分類(lèi)(287)

            隨筆檔案(289)

            漏洞

            搜索

            積分與排名

            最新評(píng)論

            閱讀排行榜

            久久精品国产亚洲Aⅴ香蕉| 久久亚洲AV成人无码电影| 99热热久久这里只有精品68| 伊人精品久久久久7777| 精品久久久久久中文字幕| 久久国产精品免费| 久久Av无码精品人妻系列| 久久免费高清视频| 青青草原综合久久| 国产激情久久久久影院老熟女免费| 亚洲综合婷婷久久| 国产99久久精品一区二区| 久久综合亚洲鲁鲁五月天| 久久久久亚洲AV综合波多野结衣| 久久九九精品99国产精品| 亚洲精品乱码久久久久久蜜桃不卡| 久久激情五月丁香伊人| 久久久WWW成人免费毛片| 久久国产乱子伦精品免费午夜| 日本久久久久久中文字幕| 国产成人无码精品久久久免费| 久久www免费人成看国产片| 久久国产精品免费| 亚洲中文字幕久久精品无码喷水 | 99热热久久这里只有精品68| 人妻丰满?V无码久久不卡| 久久影视综合亚洲| 日产精品99久久久久久| 久久精品无码专区免费| 韩国免费A级毛片久久| 人妻无码精品久久亚瑟影视| 色综合久久最新中文字幕| 亚洲国产另类久久久精品 | 日韩va亚洲va欧美va久久| 久久久一本精品99久久精品66| 26uuu久久五月天| 久久精品水蜜桃av综合天堂 | 91久久精品91久久性色| 亚洲精品乱码久久久久久蜜桃不卡| 色99久久久久高潮综合影院| 99久久99这里只有免费的精品|