forked from syswonder/ruxos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40d1727
commit 343efeb
Showing
59 changed files
with
1,573 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ pipe | |
epoll | ||
poll | ||
select | ||
virtio-9p | ||
virtio-9p | ||
rtc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root:x:0: | ||
root:x:0: | ||
root:x:0: | ||
root:x:0: | ||
root:x:0: | ||
root:x:0: | ||
root:x:0: | ||
root:x:0: | ||
root:x:0: | ||
root:x:0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash | ||
root:x:0:0:root:/root:/bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
worker_processes 1; | ||
daemon off; | ||
master_process off; | ||
|
||
error_log logs/error.log debug; | ||
|
||
events { | ||
worker_connections 32; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
|
||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 5555; | ||
server_name localhost; | ||
|
||
index index.html; | ||
|
||
root /v9fs; | ||
|
||
location / { | ||
try_files $uri $uri/ /404.html; | ||
} | ||
|
||
error_page 404 /404.html; | ||
location = /404.html { | ||
root /v9fs; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /v9fs; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* Copyright (c) [2023] [Syswonder Community] | ||
* [Rukos] is licensed under Mulan PSL v2. | ||
* You can use this software according to the terms and conditions of the Mulan PSL v2. | ||
* You may obtain a copy of Mulan PSL v2 at: | ||
* http://license.coscl.org.cn/MulanPSL2 | ||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. | ||
* See the Mulan PSL v2 for more details. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <grp.h> | ||
#include <pwd.h> | ||
#include <string.h> | ||
#include <errno.h> | ||
|
||
/* Group members */ | ||
static char *g_members__[] = { AX_DEFAULT_USER, NULL }; | ||
|
||
/* Default group */ | ||
static struct group g__ = { | ||
.gr_name = AX_DEFAULT_GROUP, | ||
.gr_passwd = AX_DEFAULT_PASS, | ||
.gr_gid = AX_DEFAULT_GID, | ||
.gr_mem = g_members__, | ||
}; | ||
|
||
// TODO | ||
int initgroups(const char *user, gid_t group) | ||
{ | ||
unimplemented(); | ||
return 0; | ||
} | ||
|
||
struct group *getgrnam(const char *name) | ||
{ | ||
struct group *res; | ||
|
||
if (name && !strcmp(name, g__.gr_name)) | ||
res = &g__; | ||
else { | ||
res = NULL; | ||
errno = ENOENT; | ||
} | ||
|
||
return res; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* Copyright (c) [2023] [Syswonder Community] | ||
* [Rukos] is licensed under Mulan PSL v2. | ||
* You can use this software according to the terms and conditions of the Mulan PSL v2. | ||
* You may obtain a copy of Mulan PSL v2 at: | ||
* http://license.coscl.org.cn/MulanPSL2 | ||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. | ||
* See the Mulan PSL v2 for more details. | ||
*/ | ||
|
||
#include <stdio.h> | ||
#include <netdb.h> | ||
|
||
|
||
// TODO | ||
struct hostent *gethostbyname(const char *name) | ||
{ | ||
unimplemented(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#ifndef NSCD_H | ||
#define NSCD_H | ||
|
||
#include <stdint.h> | ||
|
||
#define NSCDVERSION 2 | ||
#define GETPWBYNAME 0 | ||
#define GETPWBYUID 1 | ||
#define GETGRBYNAME 2 | ||
#define GETGRBYGID 3 | ||
#define GETINITGR 15 | ||
|
||
#define REQVERSION 0 | ||
#define REQTYPE 1 | ||
#define REQKEYLEN 2 | ||
#define REQ_LEN 3 | ||
|
||
#define PWVERSION 0 | ||
#define PWFOUND 1 | ||
#define PWNAMELEN 2 | ||
#define PWPASSWDLEN 3 | ||
#define PWUID 4 | ||
#define PWGID 5 | ||
#define PWGECOSLEN 6 | ||
#define PWDIRLEN 7 | ||
#define PWSHELLLEN 8 | ||
#define PW_LEN 9 | ||
|
||
#define GRVERSION 0 | ||
#define GRFOUND 1 | ||
#define GRNAMELEN 2 | ||
#define GRPASSWDLEN 3 | ||
#define GRGID 4 | ||
#define GRMEMCNT 5 | ||
#define GR_LEN 6 | ||
|
||
#define INITGRVERSION 0 | ||
#define INITGRFOUND 1 | ||
#define INITGRNGRPS 2 | ||
#define INITGR_LEN 3 | ||
|
||
FILE *__nscd_query(int32_t req, const char *key, int32_t *buf, size_t len, int *swap); | ||
|
||
#endif |
Oops, something went wrong.